I've recently created a tarball backup of my Ubuntu system (/ and /home partitions both ext4). When I was creating a backup I booted off Live DVD and I used a tar command. Now I wonder which would be the best way to untar the gzipped archive in order to restore the system. More specifically, if I should add --numeric-owner switch at the end of the tar command? I heard that it might be needed to preserve an original ownership permissions. Otherwise, I would get those from a storage media and there could be a mismatch. On the other hand, both times I use Live DVD to boot from, so maybe it's irrelevant in my particular case?
In this situation you should use the
The files in the archive were created using the user IDs from the
/etc/passwd file that's in the archive.
It's possible that users and groups exist in the archive with different numeric IDs than on the Live DVD image.
Even if you ran the same Live DVD each time, there can still be different user or group IDs in the
There are situations where you might not want to use the
--numeric-owner option. Section 8.2, Handling File Attributes, in the GNU
tar manual contains more information on this topic.