Linksys AC Series Router Configuration Tips for OpenWRT: Difference between revisions
m →Restic |
|||
| Line 1,295: | Line 1,295: | ||
Also make sure ODHCPD is disabled. According to OpenWRT documentation, ODHCPD is intended to be used for IPv6 DHCP services. However, it also has IPv4 DHCP capability which can interfere with DHCPD. | Also make sure ODHCPD is disabled. According to OpenWRT documentation, ODHCPD is intended to be used for IPv6 DHCP services. However, it also has IPv4 DHCP capability which can interfere with DHCPD. | ||
* According to documentation in /etc/config/dhcp in the 'odhcpd' section, setting this directive in this manner causes ODHCPD to take over all DHCP duties from DNSMASQ (IPv4 and IPv6): option maindhcp '1' | *According to documentation in /etc/config/dhcp in the 'odhcpd' section, setting this directive in this manner causes ODHCPD to take over all DHCP duties from DNSMASQ (IPv4 and IPv6): option maindhcp '1' | ||
* Setting the same above setting to zero, option maindhcp '0', may lead one to believe that it disables ODHCPD. This is not the case. This setting, option maindhcp '0', turns off ODHCPD IPv4 DHCP functionality. IPv6 DHCP functionality remains intact. With either setting, it can interfere with DHCPD starting. So, do one of the following; | *Setting the same above setting to zero, option maindhcp '0', may lead one to believe that it disables ODHCPD. This is not the case. This setting, option maindhcp '0', turns off ODHCPD IPv4 DHCP functionality. IPv6 DHCP functionality remains intact. With either setting, it can interfere with DHCPD starting. So, do one of the following; | ||
** service odhcpd disable | **service odhcpd disable | ||
** opkg remove odhcpd odhcpd-ipv6only | **opkg remove odhcpd odhcpd-ipv6only | ||
There are two versions of DHCPD, ISC and KEA. ISC is the older server and KEA is the newer. For simple or small networks, ISC will work fine and eliminates some configuration considerations. Read here for more information: https://www.isc.org/kea/ | There are two versions of DHCPD, ISC and KEA. ISC is the older server and KEA is the newer. For simple or small networks, ISC will work fine and eliminates some configuration considerations. Read here for more information: https://www.isc.org/kea/ | ||
| Line 2,949: | Line 2,949: | ||
*Example: restic -r "/mnt/sdb2/RESTIC/WRT3200ACM/" snapshots | *Example: restic -r "/mnt/sdb2/RESTIC/WRT3200ACM/" snapshots | ||
To restore a backup: restic -r "WhatEverRepositoryPath" restore | To restore a backup: restic -r "WhatEverRepositoryPath" restore WhatEverID --target /WhatEverPathToRestoreTo --no-cache (the ID can be obtained from the above "snapshots" command, the target does not have to be the original source, --verbose doesn't work) | ||
There is a really frustrating problem with Restic on OpenWRT when restoring a backup. Many websites recommend setting the TMPDIR environment variable to a location with a lot of space. Sadly that does not work. With careful observation, it was noticed that Retic sets up a cache file in the current user's "home / root" directory. If one is logged on as the "root" user, then this will be the /root, AKA ~ (tilde), Directory. If one has booted up the router using from the internal flash drive while attempting to recover a backup that normally resides on a USB Flash Drive and is normally mounted on /overlay, the 60 or 70 some odd MB on the internal Flash Drive will quickly fill up and cause a no space left on device" error. The simple solution when restoring is to use the --no-cache directive as shown in the above example. For additional information, see here: https://restic.readthedocs.io/en/latest/manual_rest.html (scroll down to the Caching section). Also make sure plenty of RAM is available. IE, the 512 MB built in may not be sufficient, so be sure to enable a SWAP File or SWAP Partition (see section above on SWAP) | |||
Additional Information: https://restic.readthedocs.io/en/stable/ (Note: In some of their examples a tilde ( ~ ) is used, which is a user's home directory) | Additional Information: https://restic.readthedocs.io/en/stable/ (Note: In some of their examples a tilde ( ~ ) is used, which is a user's home directory) | ||
| Line 2,976: | Line 2,978: | ||
In the above examples X and y should be replaced with actual mount point references. IE, sda1, sdb3, sde2, etc. | In the above examples X and y should be replaced with actual mount point references. IE, sda1, sdb3, sde2, etc. | ||
==== Good 'ole Fashion, just make a copy ==== | |||
Forget all the fancy backup stuff for this one. Sometimes it's good just to make a manual copy of things. Not so much in this example to avoid a failed drive, but more to preserve a working copy of stuff. The idea is whenever one embarks on a journey or a major change (even a minor one too), sometimes it's good to make a copy of a working file. For instance, using the /etc/config/network configuration file: cp /etc/config/network /etc/config/network-09.30.2020 There, a copy of the original file with a date on the end of it. Simple and effective if one needs to take a "single step back", instead of walking through the complexity of restoring files from Restic or a DD Tar.GZ file. | |||
==Border Mail System (Postfix, MailScanner, MailWatch, ClamD,== | ==Border Mail System (Postfix, MailScanner, MailWatch, ClamD,== | ||