Rsync

From Things and Stuff Wiki
Revision as of 15:00, 3 September 2012 by Milk (talk | contribs)
Jump to navigation Jump to search


Backup#Rsync

Arch

#!/bin/sh

START=$(date +%s)
rsync -aAXv /* $1 --exclude= {/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/home/*/.gvfs,/var/lib/pacman/sync/*,/home/*/.thumbnails/*,/home/*/.mozilla/firefox/*.default/Cache/*,/home/*/.cache/chromium/*}
FINISH=$(date +%s)
echo "total time: $(( ($FINISH-$START) / 60 )) minutes, $(( ($FINISH-$START) % 60 )) seconds"

touch $1/"Backup from $(date '+%A, %d %B %Y, %T')"
-a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
-A, --acls                  preserve ACLs (implies -p, save permissions)
-X, --xattrs                preserve extended attributes
-v, --verbose               increase verbosity
    --stats                 give some file-transfer stats
-h, --human-readable        output numbers in a human-readable format
    --progress              show progress during transfer
    --inplace               update destination files in-place
    --delete-after          receiver deletes after transfer, not during


rsync -axv --stats --exclude-from=${EXLUDE_FILE} --delete-after /home/clockfort /mnt/clockfort/storage/backups/jolt-home
rsync -a --acls --xattrs --whole-file --numeric-ids --delete --delete-excluded --human-readable --inplace
rsync -aPv --delete --exclude downloads --exclude music --exclude .cache /home/nomaster/ /mnt/backup/nomaster/
--archive --stats --hard-links --partial  --delete --delete-excluded --numeric-ids --inplace -x --timeout 600"
-acSHXA --numeric-ids --del
--archive --sparse --partial --delete --delete-excluded
-av --numeric-ids --delete --delete-excluded --human-readable --inplace
rsync --delete --delete-before --delete-excluded --inplace \
   --no-whole-file -a $@ "$TMP_MOUNT"/ "$BACKUP_DIR"/cur
rsync --archive --one-file-system --hard-links --inplace --numeric-ids --progress --verbose --delete --delete-excluded --exclude=/self_backups

Debian