Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .