1 |
I'd like to keep my "hot backup" machine more up-to-date. The most |
2 |
important directory is my home directory. So far, I've been doing |
3 |
occasional tarballs of my home directory and pushing them over. I |
4 |
exclude some directories for "reasons". I'd like to switch to rsync |
5 |
and run it more often. I've done the RTFM, but I'd more eyes to check |
6 |
this out before the first run. |
7 |
|
8 |
* The script will be run from root. |
9 |
* It will copy changes and new files from the local /home/waltdnes |
10 |
directory to /home/waltdnes on machine "d531". |
11 |
* It will *NOT* delete files on the destination that have been deleted |
12 |
at the source. |
13 |
* Directories ".cache", ".ccache", ".ssh", "palemoon", and "pm" will |
14 |
*NOT* be mirrored. |
15 |
|
16 |
Any comments on the ruleset below? |
17 |
|
18 |
#!/bin/bash |
19 |
rsync --no-devices --no-specials --compress --keep-dirlinks --links \ |
20 |
--group --itemize-changes --owner --perms --progress \ |
21 |
--recursive --stats --times --verbose \ |
22 |
--filter='- .cache/' \ |
23 |
--filter='- .ccache/' \ |
24 |
--filter='- .ssh/' \ |
25 |
--filter='- palemoon/' \ |
26 |
--filter='- pm/' \ |
27 |
--filter='+ /' \ |
28 |
--filter='+ /home/' \ |
29 |
--filter='+ /home/waltdnes/' \ |
30 |
--filter='+ /home/waltdnes/***' \ |
31 |
--filter='- *' \ |
32 |
--log-file=/root/rsync_log.txt \ |
33 |
/home/waltdnes waltdnes@d531:/ 2>/root/rserrors.txt |
34 |
|
35 |
-- |
36 |
Walter Dnes <waltdnes@××××××××.org> |
37 |
I don't run "desktop environments"; I run useful applications |