LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   using rsync to backup files (https://www.linuxquestions.org/questions/linux-software-2/using-rsync-to-backup-files-922737/)

newbie0101 01-08-2012 10:50 AM

using rsync to backup files
 
hello, i am trying to use rsync to backup files from source to destinaion but only those which are missing in destination.
i use:(just example)
Code:

rsync -auv /home/user/{C++,Python,Documents} /media/usb/BACKUP/
so if i create in /home/user/C++/hello.cpp and run the rsync command as above it should copy only this one file hello.cpp but i see in the output it copies everything from C++, Python and Documents.
even though this example i found in google and fom man page i cannot figure out which options should be used to copy only missing files in destination.

can you help me ?
thanks

T3RM1NVT0R 01-08-2012 02:21 PM

@ Reply
 
Hi newbie0101

Try the following command and it should work:

Code:

rsync -auv --ignore-existing /home/user/{C++,Python,Documents} /media/usb/BACKUP/


All times are GMT -5. The time now is 02:00 PM.