Re: Scripting rsync against a filesystem with a quota

2010-08-15 Thread Henri Shustak

 On another note I'm getting an error:
 
 copyfile(.._..v6AxMh,./., COPYFILE_UNPACK) failed:13
 
 When trying to run with -E.
 
 Upstream rsync has no such error message.  If you're using the
 Apple-modified rsync, we don't support it here.


You may wish to compile a version of rsync from source. Below is a link with 
instructions on compiling rsync (and directions on applying some Mac OS X 
patches). 

http://www.lbackup.org/developer/rsync_hfs

To keep things simple you may wish to skip over the steps associated with the 
patches. To do this just skip the two commands quoted below : 

 patch -p1 patches/fileflags.diff
 patch -p1 patches/crtimes.diff


Hope this helps.

--
This message is protected by LBackup
http://www.lbackup.org


-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Scripting rsync against a filesystem with a quota

2010-08-11 Thread William Hunter
Hello,


I have a couple of questions about using rsync scriptographically. I've looked 
around and can't find anything. I must be missing something obvious.


I'm trying to write a script that will synchronise various local folders on a 
Mac OS X Workstation to an SMB mounted Windows (2003, mostly) Server where the 
user I'm copying as has a quota applied. I want to compare the available space 
I have, which I can find with:


df /Volumes/$USER | grep % | awk -F'[ ] ' '{ print $4 }'


Against the amount of data that rsync thinks it is going to copy.


What I'm after is the most efficient way of finding out how much data rsync 
wants to copy, dying (relatively) gracefully should it be within X of the quota 
(say, 10MB or so).


At the moment I can use the same rsync command I'd run to do the copy but with 
the -n option:


rsync -a -u -z -E -r -l -n --progress /path/to/src /Volumes/path/to/dest/ | 
grep total size is | awk -F'[ ]' '{ print $4 }'


to do a dry-run to grep and cut a number from rsync's output.


The only thing is that this might take a while if there are very many files and 
potentially there are hundreds of thousands. I'd then have to go and run the 
same command all over again should the data fit, this time without the -n 
option. I also feel that my units may be rather disparate (i.e. df's output 
isn't the same unit sizes as rsync's).


I'm sure there must be a better way than running rsync twice.


On another note I'm getting an error:


copyfile(.._..v6AxMh,./., COPYFILE_UNPACK) failed:13


When trying to run with -E. The consensus seems to be that it's a permissions 
issue (which I'll investigate later). Thoughts?


Many thanks,
~W


***IMPORTANT NOTE***
As of the 1st March 2010 we have incorporated our Mac Support Services within 
Amsys PLC.

Amsys PLC.
Byron House,
Lower Road,
Kenley,
Surrey,
CR8 5NB

(T)  +44 (0)20 8660 7750
(F)  +44 (0)20 8763 0924
(W) www.amsys.co.uk
(E) i...@macolytes.co.uk

- Apple Authorised Service Provider (AASP) -

DISCLAIMER NOTICE
The information contained within this e-mail is confidential and is intended 
solely for the addressee. 
Access to this e-mail by any other party is unauthorised. Any views or opinions 
presented are solely 
those of the author and do not necessarily represent those of Amsys PLC. 
Internet 
communications are not secure and Amsys PLC. does not accept any responsibility 
for the contents of this message or changes made to this message after it was 
sent.

Please consider the environment before printing this e-mail
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html