backing-up with tar
CentOS 4.5
I noticed when I backed-up some of my home dir to cd's the permissions were not right so was advised to archive (tar) them first. I have used the tar command before only when installing non-rpm programs. And I have read the man page for tar. But I still am not understanding how to tar a directory in my home directory and get it on the cd, nor do I know how to get it from the cd back into my home directory. Thanks for help! |
You can use: tar cf filename.tar dirname
if you want compression, which you probably should if you have a lot of data, use: tar zcf filename.tar.gz dirname OR tar jcf filename.tar.bz2 dirname first command will create a gzipped file, second will do bzip2 compression. Good luck. |
In order to write any file to a CD you must first create an iso99660 file system on your hard drive using the mkisofs command. Then you use the cdrecord command to write the iso9660 file system to your CD-RW. See:
man mkisofs man cdrecord There are GUI front ends for burning CDs. If you want to use a GUI then try GnomeBaker: http://www.ubuntugeek.com/how-to-bur...ntu-linux.html Once you have created a backup CD you can retrieve the files by mounting the CD and copying the files from CD to hard drive using the cp command or a file manager GUI. If the files on CD are tar files then you can also retrieve them with tar. If you have enough space on the CD for the files without having to compress them then I recommend that you not use tar. Use mkisofs and cdrecord (or a GUI) to create a copy of the directory tree you are backing up. That way you can browse the directory tree on the CD and do partial restores. ------------------------- Steve Stites |
Quote:
|
Thank you! I use the nautilis -> places -> cd creator and once I tar the directories I will try to just use that to put them on cd.
So to back up say my jokes directory tar cf jokes.tar jokes Is that right? Then put jokes.tar on a cd Then after it is put back on a new system in my home dir tar -x jokes jokes.tar Am I close? |
marlaina1, when you extract, use p along with x to preserve permissions.
http://www.lamp-tips.com/man-pages/tar/ |
Quote:
------------------- Steve Stites |
Thank you all! And I see about the iso situation that I might need in the future if I can't find an easy cd creator application. And for the permission preservation instruction. I really DID read the man page before posting but was pretty much lost in space.
|
All times are GMT -5. The time now is 06:22 AM. |