LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-15-2010, 09:26 AM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,547

Rep: Reputation: 37
rsync to an external usb drive


Hi everyone. I have a 1TB USB external drive, currently formatted as fat32. What I need to do is copy two folders and all their subfolders, totaling about 500GB, to that external drive. The USB drive will have to transfer back and forth between RHEL, Windows XP, and Mac OSX computers freely.

What format should I go with on the USB drive, FAT32 or NTFS?

What rsync switches should I use? I know I don't want to use -a because I don't want any permissions restored. I'm guessing I'll have to run rsync a couple times to fully get all the files, so I need to be able to cancel an rsync, then have it pick back up where it left off, not start over and recopy every file again.

Thanks in advance!!!
 
Old 01-15-2010, 10:09 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,647

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
Can OSX write to NTFS? (I've never used a Mac)

Linux support for NTFS is pretty mature these days - ask Google for how to set it up.

NTFS is incalculably better than FAT32, so if all your platforms write to NTFS sufficiently well, use it.

If you do go with FAT32, use --modify-window=1; see rsync's man page.
 
Old 01-15-2010, 10:12 AM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,547

Original Poster
Rep: Reputation: 37
Alucard, many thanks! I know FAT32 works on all three, plus it doesn't allow for permissions, so I think I'd rather stick with that to be honest. I have tried to do an rsync -r -t a couple times, and it looked like it just kept copying everything over and over again. Should i replace the -t with the --modify-windows=1 to solve that problem? or do I need both?
 
Old 01-15-2010, 10:28 AM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,647

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
As I said, read the man page

Quote:
--modify-window
When comparing two timestamps, rsync treats the timestamps as being equal if they differ
by no more than the modify-window value. This is normally 0 (for an exact match), but
you may find it useful to set this to a larger value in some situations. In particular,
when transferring to or from an MS Windows FAT filesystem (which represents times with a
2-second resolution), --modify-window=1 is useful (allowing times to differ by up to 1
second).
 
Old 01-15-2010, 10:29 AM   #5
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,547

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by AlucardZero View Post
As I said, read the man page
Hi Alucard, I did read that. and I read it for the -t option as well. But what I don't understand from the man page is if I need both -t and that one, or just the new one you suggested.
 
Old 01-15-2010, 11:36 AM   #6
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,547

Original Poster
Rep: Reputation: 37
I'm guessing that I still need to use both. Does anyone know for sure?
 
Old 01-15-2010, 02:37 PM   #7
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,647

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
The two do different things. -t preserves timestamps on the rsynced copy. --modify-window=1 tells rsync to consider two timestamps equal if they differ by 1 second.
 
Old 01-15-2010, 02:41 PM   #8
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,547

Original Poster
Rep: Reputation: 37
ok, thanks, I'll use both.

or I wonder if i should have just used --size-only to take the timestamp out of the equation altogether, but I don't think that's the best approach.
 
Old 01-28-2010, 02:40 PM   #9
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,547

Original Poster
Rep: Reputation: 37
the t and modify window options did it.

I have only a few folders at the root, then have things broken into other subfolders under that, with the results of ls | wc -l being around 10,000 or so, I seem to be good. think another part of my problem was related to fat32 and trying to jam too much into folders.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] rsync --link-dest not creating hard links on external usb drive quasi3 Linux - General 4 08-26-2009 10:11 AM
[SOLVED] Don't rsync to disconnected external drive MurdinE Linux - General 2 08-08-2009 02:13 PM
SAMBA server with external USB trying to use rsync over SSH Iatros Linux - Newbie 2 02-24-2009 12:59 PM
Can't rsync to USB drive MooseMagnet Linux - Newbie 12 08-11-2008 07:03 PM
Rsync errors to USB drive jstars Linux - Server 8 12-23-2006 11:35 PM


All times are GMT -5. The time now is 07:47 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration