Carl Wilhelm Soderstrom writes: > I got the files all copied over from the old backup server to the new backup > server in record time by dd'ing the partition and sending it across the wire > with netcat. (then writing it to the new partition on the other machine and > using resize_reiserfs to take advantage of the new space). > > unfortunately, the UID for backuppc changed between the old system and the > new one; so I'm doing a chown on all the files.. which might be ~2.5 million > when they're all hardlinked together, but are substantially more when you > have to traverse all the trees. :( > > now that I'm partway through the chown process I can't go back and just > change the UID for backuppc (tho really it would be best to chown all the > files and be up to the latest debian standards for UID). > > for future reference, can anyone think of a faster way to chown several tens > of millions of files that are all hardlinked together? if I chown all the > files in the pools, that will also chown the files in the per-pc > directories; and concievably I could then go through with a 'find -type d' > to get all the directories in the per-pc files... but I don't know how much > time that might save, since it would have to traverse all the directory > indices anyway, then exec another command. also, there's a chance I could > miss some files. > > so I'm just letting it get on with a command like: > > cd /var/lib/backuppc > chown -R backuppc: . > > this may take until tomorrow, unfortunately. :(
I don't have a better way. I suspect the reason it is slow is that each directory typically has widely-distributed inodes, because of the hardlinking. That means a program that works through each file in each directory does lots of disk seeks. It's likely the same issue that limits the overall performance of BackupPC. A possible enhancement for Roy Keene's BackupPC client project is to sort files in inode order on the server when processing each directory. Craig ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ BackupPC-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/backuppc-users http://backuppc.sourceforge.net/
