[gpfsug-discuss] patched rsync question
Buterbaugh, Kevin L
Kevin.Buterbaugh at Vanderbilt.Edu
Wed May 10 18:57:11 BST 2017
Hi Stephen,
Thanks for the suggestion. We thought about doing something similar to this but in the end I just ran a:
rsync -aAvu /old/location /new/location
And that seems to have updated the ACL’s on everything except the 910 modified files, which we’re dealing with in a manner similar to what you suggest below. Thanks all…
Kevin
On May 10, 2017, at 12:51 PM, Stephen Ulmer <ulmer at ulmer.org<mailto:ulmer at ulmer.org>> wrote:
If there’s only 13K files, and you don’t want to copy them, why use rsync at all?
I think your solution is:
* check every restored for for an ACL
* copy the ACL to the same file in the new file system
What about generating a file list and then just traversing it dumping the ACL from the restored file and adding it to the new file (after transforming the path). You could probably do the dump/assign with a pipe and not even write the ACLs down. You can even multi-thread the process if you have GNU xargs. Something like (untested):
xargs -P num_cores_or_something ./helper_script.sh < list_of_files
Where helper_script.sh is (also untested):
NEWPATH=$( echo $1 | sed -e ’s/remove/replace/' )
getfacl $1 | setfacl $NEWPATH
--
Stephen
On May 10, 2017, at 11:52 AM, Buterbaugh, Kevin L <Kevin.Buterbaugh at Vanderbilt.Edu<mailto:Kevin.Buterbaugh at vanderbilt.edu>> wrote:
Hi All,
We are using the patched version of rsync:
rsync version 3.0.9 protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, gpfs, iconv, symtimes
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
to copy files from our old GPFS filesystem to our new GPFS filesystem. Unfortunately, for one group I inadvertently left off the “-A” option when rsync’ing them, so it didn’t preserve their ACL’s. The original files were deleted, but we were able to restore them from a backup taken on April 25th.
I looked, but cannot find any option to rsync that would only update based on ACL’s / permissions.
Out of 13,000+ files, it appears that 910 have been modified in the interim. So what I am thinking of doing is rerunning the rsync from the restore directory to the new filesystem directory with the -A option. I’ll test this with “—dry-run” first, of course. I am thinking that this will update the ACL’s on all but the 910 modified files, which would then have to be dealt with on a case by case basis.
Anyone have any comments on this idea or any better ideas? Thanks!
Kevin
—
Kevin Buterbaugh - Senior System Administrator
Vanderbilt University - Advanced Computing Center for Research and Education
Kevin.Buterbaugh at vanderbilt.edu<mailto:Kevin.Buterbaugh at vanderbilt.edu> - (615)875-9633
_______________________________________________
gpfsug-discuss mailing list
gpfsug-discuss at spectrumscale.org<http://spectrumscale.org/>
http://gpfsug.org/mailman/listinfo/gpfsug-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gpfsug.org/pipermail/gpfsug-discuss_gpfsug.org/attachments/20170510/051fea3e/attachment-0002.htm>
More information about the gpfsug-discuss
mailing list