Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As a test I:
cd testdir
touch .hidden
cd ../
tar -cvf test.tar testdir
I then tar -tf test.tar and the file .hidden is in there
I then backed up my home directory from /home:
tar -cvf homebu-04.20.205.tar /myhomedir
I watched and it looked like it was getting all the .hidden files.
I deleted my home directory and created /home on a different partition.
I then did a tar -xvf homebu-04.20.205.tar to my new home directory.
All my hidden files are missing!!!
2 questions.... Near as I can tell, tar did backup the hidden files.... Am I doing something wrong in the extraction? Or did I just fubar the tarball during the backup.
The tarball is about 9Gig long. (video editing) Could that have something to do with the problem?
I performed a similar test, tarring and then untarring a directory that contained some PNGs and a couple hidden files. They were extracted successfully. I then created a hidden directory with files in it.
Perhaps as a check, see if the .kde directory exists in your new homepage. 'ls -lad .kde/'
If not, try extracting just the .kde directory:
tar xvf homebu-04.20.205.tar myhomedir/.kde
Note that you need to include the full path for the .kde directory. Since you tarred the entire myhomedir directory, that is where the filename starts.
Also use the 't' command to list the contents of the tarred file. You might want to redirect the output to a file or the less command. Are the hidden files and directories in the listing?
For comparison, my version of tar is:
tar (GNU tar) 1.14
It seems that what is missing is most of my hidden directories, specifically:
/home/myhomedir/.gnupg
/home/myhomedir/.mozilla
/home/myhomedir/.kde <<<---- missing in tarball
/home/myhomedir/.local ...etc
It looks like everything hidden right under myhomedir/ that had a dot in front of it is missing. However interestingly enough everything the level down in the branch got backed up and restored successfully, i.e.
I found that all my hidden files are ignored.
Then I tried it again this way:
tar -Pcf myhome.tar /home/myhome
and the result was excellent, all my hidden files and directories were tarred in my tar file.
I don't know if you've used the wildcard "*" (star) but in my case it WAS the problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.