LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-11-2015, 10:41 AM   #1
rms9
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?

Thanks
 
Old 01-11-2015, 12:55 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,396

Rep: Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485Reputation: 1485
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, 01:11 PM   #3
rms9
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.
 
  


Reply


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 ld.so.1: rsync: fatal: libiconv.so.2: open failed: error SunilEA Linux - Newbie 1 01-10-2014 01:24 PM
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 03:23 AM
[SOLVED] rsync execution issue with crontab - Have given full path to rsync too!! Prabagaran Linux - Server 6 04-15-2011 01: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 08:20 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM


All times are GMT -5. The time now is 06:28 AM.

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