Linux Scroll

Just another WordPress.com site

Linux sync – rsync

Install rsync:

$ sudo apt-get -y install rsync

To backup update deb to usb:

$ sudo rsync -av --progress /var/cache/apt/archives/ /media/usb/

To backup update deb to usb with log:

$ sudo rsync -av --progress --log-file=/var/log/rsync.log --exclude 'partial' /var/cache/apt/archives/ /media/usb/

rsync + ssh:

$ sudo rsync -av --progress -e 'ssh -p 22' %username%@192.168.1.1:/var/cache/apt/

archives/ /var/cache/apt/archives/
Password:

rsync TCP port = 873
-z compression
-v verbose
-r recursive
-a archive mode
-d only directory tree
-e ‘ssh -p 22’ remote shell
-u do not overwrite a modified file
-i displays the item changes
-W transfer whole file, no checksum
–progress
–log-file=/path/log
–delete delete the file
–existing do not create new file
–max-size=’100K’
–include ‘%pattern%’
–exclude ‘%pattern%’

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: