Xsanity Sanity for Apple's Xsan and Final Cut Server.
  
Wednesday, May 22 2013 @ 10:26 AM EDT
Topics
Storage (39)
People (1)
Xsan (103)
How To (26)
User Functions
Username:

Password:

Don't have an account yet? Sign up as a New User
Who's Online
Guest Users: 12
Sponsorship

Xsanity is proudly sponsored by:

Tekserve
The Old Reliable Mac Shop

Basic? rsync question

 
Post new topic   Reply to topic    Xsanity Forums Forum Index -> Replication, Backups, and Archiving
View previous topic :: View next topic  
Author Message
geoffk
partially protected
partially protected


Joined: 23 Nov 2009
Posts: 7

PostPosted: Tue Dec 08, 2009 12:48 am    Post subject: Basic? rsync question Reply with quote

I dont know if it is the best strategy, but I am testing using rsync to update "Xsan," which has been offline, with a "XSAN_BACKUP" which has had a couple changes made to it since the backup was made.

Code:
rsync -auvvE --exclude=".*/" --size only --progress --compare-dest=/Volumes/Xsan /Volumes/Storage/XSAN_BACKUP /Volumes/Xsan/Restore


since this was a test before i committed to anything, I had it copy to a fresh directory. What i am expecting this to do is fill the restore folder with any changes that have been made to XSAN_BACKUP. When I originally created this backup I neglected to preserve timestamps, hence the --size-only.

The issue is that in this test, not only did it copy new/changed files, but it also made zero KB files of what looks like just about everything else.

So my question is, if i do this to the real Xsan, will everything get overwritten with zero KB files?

I do have a backup obviously, but i would like to avoid restoring everything if at all possible, since it took about a day and a half to make the backup Shocked

thanks everyone!
I know i have been asking alot of questions, I hope to return the favor with some answers sometime soon too![/code]
Back to top
View user's profile Send private message
matx
Xsan Master
Xsan Master


Joined: 15 Apr 2005
Posts: 378

PostPosted: Tue Dec 08, 2009 1:11 am    Post subject: Reply with quote

While I use rsync for all my backup scripts, I am no rsync expert.

I would humbly suggest to you to try "--dry-run"

From the man page:

This tells rsync to not do any file transfers, instead it will
just report the actions it would have taken.

I use it when I want to test a backup script or part of the script.
Back to top
View user's profile Send private message
matx
Xsan Master
Xsan Master


Joined: 15 Apr 2005
Posts: 378

PostPosted: Tue Dec 08, 2009 1:16 am    Post subject: Reply with quote

And on the subject of rsync, are you using the built-in rsync (/usr/bin/rsync) or have you compiled your own (e.g. /usr/local/bin/rsync)?

The built-in version on 10.6 is rsync 2.6.9 protocol version 29 with these capabilities:
64-bit files, socketpairs, hard links, symlinks, batchfiles,
inplace, IPv6, 64-bit system inums, 64-bit internal inums


Versus a newer compiled version: rsync 3.0.6 protocol version 30 with these capabilities:
64-bit files, 32-bit inums, 32-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, file-flags


I think the default version installed in 10.5 is 2.6.8.
Back to top
View user's profile Send private message
geoffk
partially protected
partially protected


Joined: 23 Nov 2009
Posts: 7

PostPosted: Tue Dec 08, 2009 1:35 am    Post subject: Reply with quote

it is the built in version. I did do --dry-run. according to that most stuff is up to date, so im not really sure why it is creating all the zero KB files.
Back to top
View user's profile Send private message
MattG
Xsan Master
Xsan Master


Joined: 15 Apr 2005
Posts: 456

PostPosted: Wed Dec 09, 2009 1:49 pm    Post subject: Reply with quote

Mike Bombich has a comprehensive article on rsync and how to download and compile 3.0.6 here. You'll need to install the Developer Tools to get the compiler on the machine, but it's well worth using the latest version of rsync rather than the one Apple has chosen to include with OS X.
Back to top
View user's profile Send private message Visit poster's website
bs3375
Could work for Apple
Could work for Apple


Joined: 02 Jul 2008
Posts: 47

PostPosted: Wed Dec 09, 2009 3:49 pm    Post subject: Reply with quote

A few words for the wise:

1) If you don't want to compile rsync 3.0.6 you can download Carbon Copy Cloner and use its compiled version. You can link to the executable by running this command in the Terminal (assuming it's installed in your Applications folder and /usr/local/bin exists)

Code:
ln -s /Applications/Carbon\ Copy\ Cloner.app/Contents/MacOS/ccc_helper.app/Contents/MacOS/rsync /usr/local/bin/


Then you can call on this version of rsync in your scripts by using the full path
Code:
/usr/local/bin/rsync


2) Just remember to compare the man pages between version 2.6.9 and 3.0.x because some of the flags have changed. For example in 2.6.9 I used
Code:
rsync -xaEPH
but in 3.0.6 I use
Quote:
/usr/local/bin/rsync -xaXPH
Code:
 to do the same thing.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Xsanity Forums Forum Index -> Replication, Backups, and Archiving All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Best Viewed on a Mac | Suggested Browser: Whatever floats yer boat.