User Functions
Don't have an account yet? Sign up as a New User
Who's Online
Guest Users: 12
|
| View previous topic :: View next topic |
| Author |
Message |
geoffk partially protected

Joined: 23 Nov 2009 Posts: 7
|
Posted: Tue Dec 08, 2009 12:48 am Post subject: Basic? rsync question |
|
|
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
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 |
|
 |
matx Xsan Master

Joined: 15 Apr 2005 Posts: 378
|
Posted: Tue Dec 08, 2009 1:11 am Post subject: |
|
|
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 |
|
 |
matx Xsan Master

Joined: 15 Apr 2005 Posts: 378
|
Posted: Tue Dec 08, 2009 1:16 am Post subject: |
|
|
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 |
|
 |
geoffk partially protected

Joined: 23 Nov 2009 Posts: 7
|
Posted: Tue Dec 08, 2009 1:35 am Post subject: |
|
|
| 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 |
|
 |
MattG Xsan Master

Joined: 15 Apr 2005 Posts: 456
|
Posted: Wed Dec 09, 2009 1:49 pm Post subject: |
|
|
| 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 |
|
 |
bs3375 Could work for Apple

Joined: 02 Jul 2008 Posts: 47
|
Posted: Wed Dec 09, 2009 3:49 pm Post subject: |
|
|
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 but in 3.0.6 I use | Quote: | /usr/local/bin/rsync -xaXPH | Code: | | to do the same thing. |
|
|
|
| Back to top |
|
 |
|
|
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
|
|