Linksys AC Series Router Configuration Tips for OpenWRT: Difference between revisions
mNo edit summary |
m →BackUps |
||
| Line 244: | Line 244: | ||
It is recommended to make sure the destination partition is the same size or larger of course. Be prepared to wait a while, even on a USB 3.0 port. | It is recommended to make sure the destination partition is the same size or larger of course. Be prepared to wait a while, even on a USB 3.0 port. | ||
*dd if=/dev/sda1 of=/dev/sda2 | *dd if=/dev/sda1 of=/dev/sda2 status=progress | ||
Note: After cloning, to save confusion and sanity, remove the source drive. It also may be necessary to reboot the router or dismount and mount the drive if it was already mounted to see the "cloned" directories and files. All of this is necessary because ''everything'' is cloned and OpenWRT may display two /dev/sdX devices that are exactly the same (IE sdb1 and sdb1 as two distinct, but duplicate device partitions). | Note: After cloning, to save confusion and sanity, remove the source drive. It also may be necessary to reboot the router or dismount and mount the drive if it was already mounted to see the "cloned" directories and files. All of this is necessary because ''everything'' is cloned and OpenWRT may display two /dev/sdX devices that are exactly the same (IE sdb1 and sdb1 as two distinct, but duplicate device partitions). | ||
| Line 2,057: | Line 2,057: | ||
*opkg update | *opkg update | ||
*opkg install htop restic luci-app-uhttpd libustream-mbedtls20150806 zoneinfo-northamerica | *opkg install htop restic luci-app-uhttpd libustream-mbedtls20150806 zoneinfo-northamerica | ||
==== Full Versions of Commands available in BusyBox (but limited in BB due to size constraints) ==== | |||
* opkg list coreutils* | |||
* opkg list shadow* | |||
* opkg list procps* | |||
Additional commands are hidden in various other non-intuitive locations. If a desired command or utility isn't available, search for it by name in the LuCI GUI interface, System, Software, Filter Field and then install the package it is contained in. Use caution as some package names and descriptions are a bit misleading and may install undesired programs. | |||
====Alternate Shells==== | ====Alternate Shells==== | ||
| Line 2,528: | Line 2,536: | ||
option family 'ipv4' | option family 'ipv4' | ||
list proto 'tcp' | list proto 'tcp' | ||
option dest_port '10012 | option dest_port '10012:10021' | ||
</syntaxhighlight>And as usual, substitute a functional IP Address for W.X.Y.Z. The above configuration includes settings necessary for Passive FTP (see [[wikipedia:File_Transfer_Protocol#Communication_and_data_transfer|here]] for an explanation) used by clients behind a firewall. | </syntaxhighlight>And as usual, substitute a functional IP Address for W.X.Y.Z. The above configuration includes settings necessary for Passive FTP (see [[wikipedia:File_Transfer_Protocol#Communication_and_data_transfer|here]] for an explanation) used by clients behind a firewall. | ||
| Line 2,651: | Line 2,659: | ||
===BackUps=== | ===BackUps=== | ||
==== Restic ==== | |||
opkg install restic | opkg install restic | ||
| Line 2,666: | Line 2,676: | ||
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) | ||
==== DD ==== | |||
Another program that functions as an effective cloning utility is ''dd'' (noted in an earlier section). Ideally an additional USB Flash drive should be used. Note, to utilize the full dd program, instead of the one built into BusyBox: opkg install corutils | |||
* dd if=/dev/sdXy of=/dev/sdXy bs=64K conv=noerror,sync status=progress (if = source, of = destination, bs=block size (IE amount to copy at a time), noerror=Don't stop on read errors, sync=If an error occurs use zeros or nuls to pad file, progress=show the progress) | |||
To copy to a compressed file; | |||
* dd if=/dev/sdXy conv=sync,noerror bs=64K status=progress | gzip -c > /WhatEverPath/WhatEverFile.img.gz (-c=Do not change files) | |||
* Example: dd if=/dev/sdb1 conv=sync,noerror bs=64K status=progress | gzip -c > /mnt/sdb2/DD/EXT4a-9.20.2020.img.gz | |||
Everything will be cloned, including the UUID of the partition. If the second flash drive is being used for the sole purpose of backing up settings, as opposed to replacing a bootable flash drive, then to prevent confusion with the source USB Flash Drive or Partition, change the UUID; | |||
* tune2fs -U random /dev/sdXy* | |||
OR | |||
* tune2fs -U UUID /dev/sdXy* (where UUID is the actual UUID) | |||
To verify the change, use the following command; | |||
* blkid /dev/sdXy | |||
In the above examples X and y should be replaced with actual mount point references. IE, sda1, sdb3, sde2, etc. | |||
==Border Mail System (Postfix, MailScanner, MailWatch, ClamD,== | ==Border Mail System (Postfix, MailScanner, MailWatch, ClamD,== | ||