Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-11-2015, 11:41 AM   #1
LQ Newbie
Registered: Jan 2015
Posts: 5

Rep: Reputation: Disabled
rsync both ways

This is probably very basic, but I am totally new to Linux.

I am tryng to sync a usb data stick to Documents directory using:
rsync -auvhi /media/2C24-DC8F/ ~/Documents/

I then sync the other way [rsync -auvhin ~/Documents/ /media/2C24-DC8F/] expecting little or nothing, but end up with a massive list. A typical item being: .f.....g... boats/Siskiwit-Bay-SOF.pdf

My very limited undertanding makes me think that the group has changed during the first operation despite using -a, which I thought preserved the group.

Basically I am trying to keep /Documents and my data stick identical as I move between computers. Any suggestions?

Old 01-11-2015, 01:55 PM   #2
Senior Member
Registered: Aug 2009
Distribution: CentOS
Posts: 4,505

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
What does "ls -l" show for the two files?

It's a bit more complex than just "basic." The USB flash drive is probably formatted FAT32, which cannot preserve all of the Linux permissions. On Linux you cannot give a file a GID for a group you are not a member of, so the GIDs may not match even on files you just copied. When rsync-ing to/from a USB flash drive, I always include the options "--no-g" and "--modify-window=3602". The "--no-g" will ignore GIDs, and the "--modify-window" avoids issues with time resolution (2 seconds on FAT32) and changes in Daylight Savings Time status (FAT32 uses local time in its time stamps).
Old 01-11-2015, 02:11 PM   #3
LQ Newbie
Registered: Jan 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Documents: -rwxr-xr-x 1 robert robert 2860731 Sep 19 18:22 Siskiwit-Bay-SOF.pdf
Flash drive: -rwxr-xr-x 1 root root 2860731 Sep 19 18:22 Siskiwit-Bay-SOF.pdf

It is FAT, but I also use an ex-FAT disc so that I can have a file >4Gb; I haven't tried rsync on it yet.

Your suggestions seem to work a treat. Thanks for the help.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync giving rsync: fatal: open failed: error SunilEA Linux - Newbie 1 01-10-2014 02:24 PM
rsync solaris + rsync: fatal: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 04:23 AM
[SOLVED] rsync execution issue with crontab - Have given full path to rsync too!! Prabagaran Linux - Server 6 04-15-2011 02:39 AM
LXer: 15 Ways Nokia’s N900 Is Better Than Apple’s iPhone (and 5 ways it’s not) LXer Syndicated Linux News 0 11-14-2009 09:20 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 05:08 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:01 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
Open Source Consulting | Domain Registration