Changes between Version 1 and Version 2 of full-filesystem-rsync


Ignore:
Timestamp:
Feb 8, 2012, 6:47:14 PM (10 years ago)
Author:
Daniel Kahn Gillmor
Comment:

cleanup

Legend:

Unmodified
Added
Removed
Modified
  • full-filesystem-rsync

    v1 v2  
    88
    99{{{
    10 target=root@leslie.new:/mnt/
     10# make sure all the remote filesystems are properly mounted under /mnt
     11target=root@leslie.new:/mnt
    1112
    12 # -a typically means: --recursive --links --perms --times --group --owner
    13 # --devices --specials
     13# all user/system non-temporary filesystems on the origin server:
     14originfilesystems="srv var home"
     15
     16# -a typically means: --recursive --links --perms --times --group --owner --devices --specials
    1417# we don't use extended attributes normally (otheriwse, we might want -X)
    1518# or ACLs (otherwise might consider -A)
    1619
    17 exclude="--exclude /etc/fstab --exlude /etc/network/interfaces /etc/udev/rules.d/*"
    18 rsync -ax --hard-links --delete $exclude / "$target"
    19 rsync -ax --hard-links --delete /srv "$target"
    20 rsync -ax --hard-links --delete /var "$target"
     20exclude="--exclude /etc/fstab --exclude /etc/network/interfaces --exclude /etc/udev/rules.d"
     21rsync -ax --hard-links --delete $exclude / "${target}"/
     22for fs in ${originfilesystems}; do
     23  echo "transfering filesystem from /${fs}"
     24  rsync -ax --hard-links --delete /$fs/ "${target}/$fs/"
     25done
    2126}}}