Date: Sun, 13 Feb 2005 14:33:08 -0800 (PST)
From: Mr O <[EMAIL PROTECTED]>
Subject: [Eug-lug] tar up home for a nuke and pave

I've seen it come across the list before but don't know an easy
way of searching the archives. How do I tar my home directory
and a couple others so I can move them off disk to restore later
with all permissions?

su cd / tar -czf descriptiveName.tgz home [otherDir]

The filename 'descriptive...' is my pref --you can just call it t.tgz , but the more you put in there, the more you will recognize months later.
I gave the example for /home [/otherDir] -- you can add more but don't use the leading / in the command. I don't use the -v (verbose) option since I want to only see errors, if any.



Also, when restoring I should untar home first before creating the user right? Any other precautions?

Maybe. When you reinstall as root su cd / # optional to preview: tar -tzf descriptiveName.tgz | less # then do it: tar -xzf descriptiveName.tgz

you may see the correct group and owner as names --if you see numbers instead you either need to fiddle with 'chown' or 'usermod' but that's a different story.
If you did not change /etc/passwd and /etc/group the restore should be smooth (tar stores the UID and GID --not the names associated)
There may be no need of deleting and re-creating the users.


Warning: if you also tar /etc and other /stuff you want to be *not* in / (rootDir) when you extract from the .tgz -- cd to /tmp (e.g.) and extract there 'tar -xzf filename.tgz' --then you handle individual files in /tmp/etc/
The tar -tzf name.tgz | less above shows you where the extract goes.


 - Horst

Thanks a zillion.
  What of ???

_______________________________________________
EUGLUG mailing list
euglug@euglug.org
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to