|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Xattrs and Delete over AFPHello group,
I have an OSX 10.3.9 Server that I'm trying to back up with rsync 3.0.2. Since I didn't have any luck with the 10.3.9 patch and I do have 10.4 clients, I decided to try running the backup over AFP (Apple's file sharing protocol). I found a way to mount the AFP volume with root permissions and rsync 3.0.2 works very nicely using this on the 10.4 clients, preserving xattrs and being good. I understand it's not the preferred method but the rsync we're using for 10.3.9 is version 2.6.0 and the malloc errors are killing me. When I add any of the --delete options (during, delay, or after) to the line it works for a while and then starts getting this: rsync: get_xattr_data: lgetxattr("Path-to-the-file","com.apple.ResourceFork",0000) failed: Bad file descriptor (9) The 0000 is different for each file. The rsync line I'm using is: rsync -aHXh --stats --progress --fileflags --crtimes --delete /Volumes/Source_Volume /Volumes/Local_Drive/Source_Mirror/ Any ideas on why the delete option would cause this to happen? Thanks for making rsync the unbelievable tool it is. Mike -- 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 |
|
|
Re: Xattrs and Delete over AFPOn Sat, 2008-06-21 at 21:34 -0400, zodiac-meow@... wrote:
> I have an OSX 10.3.9 Server that I'm trying to back up with rsync 3.0.2. > Since I didn't have any luck with the 10.3.9 patch To be perfectly clear, do you mean you have tried Vitorio Machado's patch? http://lists.samba.org/archive/rsync/2008-February/020093.html If not, that may be worth a try. > When I add > any of the --delete options (during, delay, or after) to the line it works for > a while and then starts getting this: > > rsync: get_xattr_data: > lgetxattr("Path-to-the-file","com.apple.ResourceFork",0000) failed: Bad file > descriptor (9) This may just be an oddity with the network filesystem, but that doesn't explain why it would happen only with a --delete option, which shouldn't significantly change rsync's access pattern to the network-mounted source. If you ktrace the relevant rsync process with and without --delete, that might provide some clues about what triggers the error. Since the error only happens with --delete and appears to involve xattrs, you may be able to work around it by using two passes of rsync, the first with -X but not --delete and the second with --delete but not -X. Matt -- 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 |
|
|
|
|
|
Re: Xattrs and Delete over AFPOn Sun, 2008-06-22 at 17:28 -0400, zodiac-meow@... wrote:
> And it works on most files OK. So far, so good. It does > gets this error on some files and directories: > > rsync: get_xattr_names: llistxattr(" New Art Dept/John:Projects",1024) failed: > Invalid argument (22) > > I've narrowed this down to it being only file or directory names with a "/" in > them (which OSX translates into a ":" in terminal). This doesn't occur when > using an rsync without the pre-Tiger patch. This is still great news though! > So close... rsync users a favor by fixing the colon/slash issue. > It also looks like it fails to report > the existence of some files and directories because rsync will delete items > that are still in the source. I have a guess about how that is happening. With -X, when rsync fails to read the extended attributes of a source file (or directory), it omits the file from the file list. This behavior avoids removing previously copied extended attributes from the destination file, but with --delete, it might lead to the deletion of the destination file. To avoid that, errors that result in the omission of files from the file list are supposed to set the IOERR_GENERAL flag, which inhibits deletion altogether, but this appears to have been overlooked in the case of an extended attribute error. An attempt at a patch is attached; Wayne, please look into it. Matt [more-ioerr-general.diff] diff --git a/flist.c b/flist.c index b0b05dc..a99a2ee 100644 --- a/flist.c +++ b/flist.c @@ -1009,7 +1009,12 @@ static struct file_struct *recv_file_entry(struct file_list *flist, * and performing extensive checks against global options. * * Returns a pointer to the new file struct, or NULL if there was an error - * or this file should be excluded. */ + * or this file should be excluded. + * + * Note: Any error (here or in send_file_name) that results in the omission of + * an existent source file from the file list should set + * "io_error |= IOERR_GENERAL" to avoid deletion of the file from the + * destination if --delete is on. */ struct file_struct *make_file(const char *fname, struct file_list *flist, STRUCT_STAT *stp, int flags, int filter_level) { @@ -1027,6 +1032,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, char *bp; if (strlcpy(thisname, fname, sizeof thisname) >= sizeof thisname) { + io_error |= IOERR_GENERAL; rprintf(FINFO, "skipping overly long name: %s\n", fname); return NULL; } @@ -1336,15 +1342,19 @@ static struct file_struct *send_file_name(int f, struct file_list *flist, if (preserve_acls && !S_ISLNK(file->mode)) { sx.st.st_mode = file->mode; sx.acc_acl = sx.def_acl = NULL; - if (get_acl(fname, &sx) < 0) + if (get_acl(fname, &sx) < 0) { + io_error |= IOERR_GENERAL; return NULL; + } } #endif #ifdef SUPPORT_XATTRS if (preserve_xattrs) { sx.xattr = NULL; - if (get_xattr(fname, &sx) < 0) + if (get_xattr(fname, &sx) < 0) { + io_error |= IOERR_GENERAL; return NULL; + } } #endif -- 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 |
|
|
Re: Xattrs and Delete over AFPOn Sun, Jun 22, 2008 at 06:09:02PM -0400, Matt McCutchen wrote:
> An attempt at a patch is attached; Wayne, please look into it. Looks good to me. I've applied it to the source. ..wayne.. -- 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 |
| Free Forum Powered by Nabble | Forum Help |