john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Rsync differential backup

rsync --recursive --archive --times --stats SourceDir/ /mnt/BACKUP/TargetDir/ (--progress --dry-run)

a very fast file copy utility http://www.samba.org/ftp/rsync/rsync.html

EXAMPLE OF A PULL ON NON STANDARD SSH PORT

OR use the utility meant for this: chown -R username:username /source

cd / rsync -avz -e 'ssh -p2345' --progress --ignore-existing username@192.168.1.60:/source .

(note the period on the end is not an error, we want to copy into the /source directory from root, otherwise if /source already exists on the destination you might create /source/source)

NOTE that this is a push:

rsync -avz -e ssh --progress --ignore-existing src/ user@server:dest/

THE SAME command as a pull:

rsync -avz -e ssh --progress --ignore-existing user@server:src/ dest/

-z compress data during transfer -v verbose - tell me what's going on -a archive mode (keep things as they were on the old system), same as -rlptgoD -t = keep times

-e specify the remote shell (e.g. using ssh on the target machine, or ftp?)

--existing skip creating new files on receiver --ignore-existing skip updating files that exist on receiver


rsync may allow you to just get the differences between the two files

rsync -av --progress --stats --compress rsync://ftp.site.com/iso/F-7-i386-DVD.iso F-7-i386-DVD.iso


Local: rsync [OPTION...] SRC... [DEST]

Access via remote shell:

Pull: rsync [OPTION...] [USER@]HOST:SRC... [DEST]

Push: rsync [OPTION...] SRC... [USER@]HOST:DEST

Access via rsync daemon: Pull: rsync [OPTION...] [USER@]HOST::SRC... [DEST] rsync [OPTION...] rsync://[USER@]HOST[:PORT]/SRC... [DEST] Push: rsync [OPTION...] SRC... [USER@]HOST::DEST rsync [OPTION...] SRC... rsync://[USER@]HOST[:PORT]/DEST


  • « FileSystemPath
  • Bash for loop examples files in a directory loop count »

Published

Aug 4, 2012

Category

linux

~225 words

Tags

  • backup 10
  • differential 1
  • linux 249
  • rsync 1