Rsync

From Things and Stuff Wiki
Revision as of 13:51, 3 September 2012 by Milk (talk | contribs) (a start)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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')"

Debian