LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using cpio to backup to CDROM (https://www.linuxquestions.org/questions/linux-newbie-8/using-cpio-to-backup-to-cdrom-207115/)

Cyberhund 07-19-2004 05:04 PM

Using cpio to backup to CDROM
 
I'm lost without my smit! :)

I need to backup a few Red Hat Linux systems to CDROM, and I'm having a heck of a time figuring out how to do this. I'd like to use the cpio command. Is there someone out there who could outline (briefly) this process for me? Can I just cpio > directly to a blank CD in the system's CDROM drive?

Thanks in advance for your help!

rylan76 07-21-2004 11:21 AM

Do you mean you need to backup EVERYTHING i.e the /dev directory and /proc?

Or just the data i. e. program files and directories/folders?

To backup selected parts of my Linux system, I use tar and gzip, then Gnome Toaster to burn to CD.

If you want to user tar and gzip, do something like this

tar cvf backuparchive.tar ./directory

This will "tar" ./directory into backuparchive.tar. Then do

gzip backuparchive.tar

and then use Gnome Toaster to burn this to CD.

Don't try to copy or backup /dev or /proc - bad karma. As far as I know /proc changes constantly and is only "valid" for one run of the system from startup to shutdown. /dev usually has custom stuff inside installed by installing certain programs.

Of course, you can try

tar cvf everything.tar /

but this is not recommended. When you restore that archive later with

tat zxvf everything.tar.gz

you will overwrite the /dev/ and /proc directories. Overwriting proc is a surefire recipe to crash your system and make it unusable (I think - happened to my once).

So the best bet is to identify which PROGRAMS and DATA is to be backed up. Then, logged in as root and in / do

tar cvf mybackup.tar /important_directory /another_important_directory /data /home/mydata

etc. and so on on each linux system. The only problem with is that the resulting tar.gz file may be too big for one
CD. But it should give you an idea in which direction to proceed. A hackneyed solution would be to tar gzip tar gzip tar gzip in little steps until you fill a CD.

Either way, you might want to google for a free program that will do this for you or even find a commercial vendor that might sell you a solution. I have always followed a policy of mirroring my important stuff manually to my Windows partition, and when I want to backup the whole system I use my Windows CD writer program to backup the windows part of the disk - which I have already ensured has the vital stuff of the windows AND Linux partitions contained in it.

Anyway, hope this helped a bit,

SheldonPlankton 07-21-2004 11:33 AM

I have heard good things about DAR.
http://sourceforge.net/projects/dar/

Cyberhund 07-21-2004 01:49 PM

Many thanks!


All times are GMT -5. The time now is 10:38 PM.