Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to do a backup from Linux to USB Pen Drive with rsync each day and I take home the Pen Drive at night. I am running the following command but it looks like its update every file every day?

rsync -y -r -vv ~/Documents/ /media/PenDrive/xxxx-home/

Can someone please tell me if this can be done better I used to just tar of my ~/Documents and cp the file to my Pen Drive but my SA said this would be better but I dont think it is..

and sometimes I am getting this message

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

share|improve this question

migrated from Jan 24 '13 at 21:54

This question came from our site for system and network administrators.

What format is the filesystem on the pen drive? If it is NTFS then rsync will fail to copy the rights from ext2/3/4. That will cause errors unless you tell rsync not to attempt that. --- Also try --modify-window=1 (For the logic behind that, see – Hennes Jan 24 '13 at 13:59
format is msdos so it can be used on windows and my mac.. Can you please tell me how to make it not come the rights – user150591 Jan 24 '13 at 14:04
Posted as an answer. Please check if it works and read this sites FAQ. (You probably wanted to post to superuser, not to SF). – Hennes Jan 24 '13 at 14:10
what do you think about rsync -rltDvu --modify-window=1 --progress --delete ~/Documents/ /media/PenDrive/uftwf-home/ – user150591 Jan 24 '13 at 14:12
up vote 5 down vote accepted

rsync --modify-window 1 -a --no-o --no-p --no-g ~/Documents/ /media/PenDrive/uftwf-home/

--modify-window 1 because fat "represents times with a 2-second resolution"
--no-o because vfat does not support owners
--no-g because vfat does not support groups
--no-p because vfat does not support permissions
share|improve this answer
what do you think about rsync -rltDvu --modify-window=1 --progress --delete ~/Documents/ /media/PenDrive/xxxx-home/ – user150591 Jan 24 '13 at 14:11
--progress is a cosmetic choice. --delete is a personal choice. -r and other values can be used. I just specified the flag which solve the problem. If you want to add more options that that should not be a problem. – Hennes Jan 24 '13 at 14:13
do I need -a option? – user150591 Jan 24 '13 at 14:15
I had to use --modify-window 2, but otherwise thanks – Steven Penny May 20 '15 at 3:30

You must log in to answer this question.