4/28/2009

rsync

Local Backup
sudo rsync -azvv /home/path/folder1/ /home/path/folder2
Remote Backup
sudo rsync --delete -azvv -e ssh /home remoteuser@remotehost.remotedomain:

/backupdirectory
-z compresses the data --delete deletes files that don't exist on the system being backed up. Maybe you want this, maybe not. -a preserves the date and times of the files (same as -t), descends recursively into all directories (same as -r), copies symlinks as symlinks (same as -l), preserves file permissions (same as -p), preserves groups (same as -g), preserves file ownership (same as -o), and preserves devices as devices (same as -D). -vv increases the verbosity of the reporting process

for my case:

gyuan@frankie:~$ sudo rsync -azvv /home/gyuan/Desktop/ADST_backup/ /data2/ADST_backup/


gyuan@frankie:~$ sudo rsync --delete -azvv -e ssh gyuan@zen.phys.lsu.edu:/home/gyuan/Desktop/ADST_backup /home/gyuan/Desktop/ADST_backup/



gyuan@shanghai:~$ sudo rsync --delete -azvv -e ssh gyuan@frankie.phys.lsu.edu:/home/gyuan/Desktop/ADST_backup/ /home/gyuan/Desktop/ADST_backup

gyuan@frankie:~$ sudo rsync --delete -azvv -e ssh /home/gyuan/Desktop/ADST_backup/ gyuan@paris.phys.lsu.edu:/home/gyuan/Desktop/ADST_backup



show progress
gyuan@frankie:~$rsync -avz QGSjetII_Iron_v2r5p5_SRB gyuan@zen.phys.lsu.edu:/nfs/data/sim/ --progress -h

exclude files
rsync -avz gyuan@ccali.in2p3.fr:/sps/pauger/Simulations/libraries/augermgr.ccin2p3/QGSjetII_Proton_v2r5p5_SRB/en19.500/th0.65/011000/20081114 test  --progress -h --exclude '*Offline.root' --exclude '*.tar' --exclude '*.out'

gyuan@hyde: rsync -avz --delete  gyuan@zen.phys.lsu.edu:/data/Sim_ADST/ /nfs/data/Sim_ADST/ --progress -h

没有评论: