I'd like to keep my "hot backup" machine more up-to-date. The most
important directory is my home directory. So far, I've been doing
occasional tarballs of my home directory and pushing them over. I
exclude some directories for "reasons". I'd like to switch to rsync
and run it more often. I've done the RTFM, but I'd more eyes to check
this out before the first run.
* The script will be run from root.
* It will copy changes and new files from the local /home/waltdnes
directory to /home/waltdnes on machine "d531".
* It will *NOT* delete files on the destination that have been deleted
at the source.
* Directories ".cache", ".ccache", ".ssh", "palemoon", and "pm" will
*NOT* be mirrored.
Any comments on the ruleset below?
#!/bin/bash
rsync --no-devices --no-specials --compress --keep-dirlinks --links \
--group --itemize-changes --owner --perms --progress \
--recursive --stats --times --verbose \
--filter='- .cache/' \
--filter='- .ccache/' \
--filter='- .ssh/' \
--filter='- palemoon/' \
--filter='- pm/' \
--filter='+ /' \
--filter='+ /home/' \
--filter='+ /home/waltdnes/' \
--filter='+ /home/waltdnes/***' \
--filter='- *' \
--log-file=/root/rsync_log.txt \
/home/waltdnes waltdnes@d531:/ 2>/root/rserrors.txt
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
important directory is my home directory. So far, I've been doing
occasional tarballs of my home directory and pushing them over. I
exclude some directories for "reasons". I'd like to switch to rsync
and run it more often. I've done the RTFM, but I'd more eyes to check
this out before the first run.
* The script will be run from root.
* It will copy changes and new files from the local /home/waltdnes
directory to /home/waltdnes on machine "d531".
* It will *NOT* delete files on the destination that have been deleted
at the source.
* Directories ".cache", ".ccache", ".ssh", "palemoon", and "pm" will
*NOT* be mirrored.
Any comments on the ruleset below?
#!/bin/bash
rsync --no-devices --no-specials --compress --keep-dirlinks --links \
--group --itemize-changes --owner --perms --progress \
--recursive --stats --times --verbose \
--filter='- .cache/' \
--filter='- .ccache/' \
--filter='- .ssh/' \
--filter='- palemoon/' \
--filter='- pm/' \
--filter='+ /' \
--filter='+ /home/' \
--filter='+ /home/waltdnes/' \
--filter='+ /home/waltdnes/***' \
--filter='- *' \
--log-file=/root/rsync_log.txt \
/home/waltdnes waltdnes@d531:/ 2>/root/rserrors.txt
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications