Welcome to the most active Linux Forum on the web.
Go Back > Blogs > sag47
User Name


Rate this Entry

rsync commands and how I backup

Posted 06-23-2011 at 05:06 PM by sag47
Updated 06-23-2011 at 05:07 PM by sag47

I run the following command when I want to just update one directory to another. It only copies files that have changed. If any files have been deleted from A they still exists in directory B. The trailing slash after A/ is necessary to tell rsync to move the contents. Otherwise A will create a folder in B called /media/B/A and move the files over.

rsync -ruptv /media/A/ /media/B
I run the following command when I want to mirror one directory to another. Any files that are deleted from A are also deleted from B. Only modified files in A are moved to B.

rsync -ruptv --delete /media/A/ /media/B
This command is similar to the last command but it excludes certain files/types.

rsync -ruptv --delete --exclude=Thumbs.db /media/A/ /media/raid/B
I utilize those commands on a schedule with crontab -e.
0 3 * * 3,6 /home/sam/
Basically that command runs every Wednesday and Saturday at 3am. This is pretty easy to use.

Posted in Uncategorized
Views 1676 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 01:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration