This is an old revision of the document!


pendejo

To copy files from remote to local, maintaining file properties and sym-links (-a), zipping for faster transfer (-z), verbose (-v).

rsync -avz host:file1 :file1 /dest/
rsync -avz /source host:/dest

Copy files using checksum (-c) rather than time to detect if the file has changed. (Useful for validating backups).

rsync -avc /source/ /dest/

Copy contents of /src/foo to destination:

This command will create /dest/foo if it does not already exist

rsync -auv /src/foo /dest

Explicitly copy /src/foo to /dest/foo

rsync -auv /src/foo/ /dest/foo

LMGM MAIL work mails

#rsync --dry-run --itemize-changes --stats -h --archive /run/media/barriot/1AB6-AB2B/Mail /home/barriot/Documents/Mail/work/Mail 

rsync --dry-run --itemize-changes --stats -h --archive /run/media/barriot/1AB6-AB2B/Mail/Local/ /home/barriot/Documents/Mail/Local/WORK.Local.sbd/

# pendejo /home/barriot/box.local on biskit (run as root)
rsync --dry-run --archive --hard-links --delete --acls --xattrs --one-file-system --itemize-changes --stats -h --exclude='*/.thumbnails' --exclude='*/Cache' --exclude='*/.cache' --exclude='*/.gvfs' --exclude='.local/share/Trash/' /home/barriot/box.local/ /run/media/barriot/ext/pendejo.barriot/box.local/ 

# TEACHING USB
rsync --dry-run --itemize-changes --stats -h --archive /run/media/barriot/1AB6-AB2B/TEACHING/2016-2017/L2-L3-Bioinfo/ box.local/TEACHING/2016-2017/L2-L3-Bioinfo/

AMAP

rsync --dry-run --itemize-changes --stats -h --archive box/Administrative_stuff/amap/ box.local/Administrative_stuff/amap/
rsync --dry-run --itemize-changes --stats -h --archive box.local/Administrative_stuff/amap/  box/Administrative_stuff/amap/

System and data backup

time rsync  --dry-run --exclude '*.fucked.up' --itemize-changes -a --stats -h /boot/ /mnt/barracuda3t/pendejo/boot/
time rsync  --dry-run --exclude '*.fucked.up' --itemize-changes -a --stats -h --hard-links --acls --xattrs --one-file-system / /mnt/barracuda3t/pendejo/rootfs/
time rsync  --exclude '*.fucked.up' --itemize-changes -a --stats -h /home/ /mnt/barracuda3t/pendejo/home/