Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I upgrade or reinstall linux I backup my home folder by running sudo cp -pr /home/users/yitzchak /media/externalHDD/backups. When I do this I get errors saying that permissions could not be preserved and when I copy the folder back onto my local disk I see that ownership has been changed to root and I have to chown all of them back, which has to be done manually piecemeal because not all files have the same group. Is there any way around that?

share|improve this question
    
I don't think this has to do with it being an external volume. More likely it is the file system of the volume (probably fat32 or some other file system that does not support all attributes). tar, cpio and other archiving utilities will preserve attributes if you don't need direct access as do some version control systems –  technosaurus Mar 26 '12 at 7:40

1 Answer 1

up vote 1 down vote accepted

I recommend you to archive the files during these backups, even without compression:

tar cf /media/externalHDD/backups/yitzchak.tar /home/users/yitzchak

tar will keep all the file attributes.

share|improve this answer
    
Worked, didn't think of that. Thanks! –  Yitzchak Mar 25 '12 at 18:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.