LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2003, 03:55 PM   #1
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
backing up /var to cd


Hello all. I want to backup my /var partition on to a cd. I think what I have to do is create an iso of my /var partition first and then burn it to cd. So would it be like this:

mkisofs -o var_backup.iso /var
cdrecord -v speed=5 dev=0,0,0 -data /path/to/var_backup.iso

ummm...is this right? In the man pages for mkisofs it says something about Rock Ridge Extensions. Do I need those? This won't remove anything from the /var partition will it?

Is there a better way to do this?

Thanks in advance.
 
Old 05-10-2003, 04:01 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
better as in?

you don't actually need to create the iso on the drive at all ...

mkisofs /var | cdrecord -

but then you'd probably want to add a check to make sure that it will fit, e.g. grepping a du or something.
 
Old 05-10-2003, 04:03 PM   #3
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Original Poster
Rep: Reputation: 57
You've spawned more questions acid. What if I want to backup /var and /etc? How do you add a checksum?

/me bows down in the presence of acid_kewpie

Last edited by Crashed_Again; 05-10-2003 at 04:11 PM.
 
Old 05-10-2003, 05:03 PM   #4
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,185

Rep: Reputation: 52
# KisoCD 0.6.4
mkisofs -L -l -J -R -A Disc-ID -P Publisher-ID -p Preparer-ID -V Volume-ID /etc/=/etc/ /var/=/var/ | cdrecord -v -pad -data -multi fs=12m speed=52 dev=0,0,0 driveropts=burnproof -

that'll give you some more options to think about.
 
Old 05-10-2003, 05:13 PM   #5
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Original Poster
Rep: Reputation: 57
Okay now I am more confused.
 
Old 05-10-2003, 05:21 PM   #6
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,185

Rep: Reputation: 52
those are just the options my burning program puts
together when i set it to burn /var and /etc.
a bunch of mkisofs options, including joliet and
rockridge. I figured you would see how to add dirctories
to the iso image, here being created on the fly and written
to - (standard in), and cdrecord taking that data and
writing it to a multi-session cdrom, as the first session,
without an intermediate iso image. the - at the end tells
cdrecord to read from standard in instead of from a file.
 
Old 05-10-2003, 05:43 PM   #7
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Original Poster
Rep: Reputation: 57
hmmmm...so you would suggest to use that EXACT command or should I use the KisoCD program?
 
Old 05-10-2003, 05:58 PM   #8
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
You can always tar and gzip, then burn. Squeeze that sucker down.
 
Old 05-10-2003, 06:16 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Quote:
Originally posted by fancypiper
You can always tar and gzip, then burn. Squeeze that sucker down.
as part of a pipe command of course, zip on the fly...
 
Old 05-10-2003, 06:37 PM   #10
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Original Poster
Rep: Reputation: 57
See I tried that before but it didn't work. It wrote to the cd but the cd would not mount when I was done. I guess thats why I have to zip on the fly right. So do if I tarred some files, gzipped them, and then wrote the .tar.gz file to cd that would not work your saying. You must do it on the fly. Okay so would doing it on the fly look like this:

tar -cvf var_backup.tar /var/* | gzip | cdrecord -v speed=5 dev=0,0,0 -data

Like that? hmmm...I know I'm being a pain here but I've never done this before.
 
Old 05-10-2003, 09:58 PM   #11
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,185

Rep: Reputation: 52
you've got to use the mkisofs to create the iso filesystem
for the cdrom.
you could
mkdir /backups
tar clfvz - /var > /backups/var.tgz
tar clfvz - /etc > /backups/etc.tgz

mkisofs -L -l -J -R -A Disc-ID -P Publisher-ID -p Preparer-ID -V Volume-ID /backups/=/backups/ | cdrecord -v -pad -data -multi fs=12m speed=52 dev=0,0,0 driveropts=burnproof -

Last edited by whansard; 05-10-2003 at 10:00 PM.
 
Old 05-10-2003, 10:11 PM   #12
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You seem to be getting confused from all the options specified. You don't need the PublisherID or any of the ID's those are just to help you organize your backups easier. If you don't think you'll use them, leave them out of the equation:
mkisofs -L -l -J -R /backups/=/backups/ | cdrecord <options> -

Whansard:
I tried to mkisofs with the /backups/=/backups/ option, but I get errors. This is the only part of it I don't understand, so could you elaborate, or link to where you got that option from? Maybe my version of mkisofs is too old to handle that option? Or maybe it's been removed on my newer version if yours is older?



Cool
 
Old 05-11-2003, 03:08 AM   #13
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,185

Rep: Reputation: 52
yeah, thats for an old mkisofs. i forgot, i have both a new
and an old.
take out the /backups/=/backups/ and replace with
/backups/
i guess they changed the way they specify a changed
directory name with mkisofs. my old kisocd program
doesn't work with the newer mkisofs because of that.
i completely forgot.
 
Old 05-11-2003, 03:14 AM   #14
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Original Poster
Rep: Reputation: 57
Okay so:

mkdir /backups
tar clfvz - /var > /backups/var.tgz
tar clfvz - /etc > /backups/etc.tgz
mkisofs -L -l -J -R /backups/ | cdrecord -v speed=5 dev=0,0,0 -

hehe is that right?
 
Old 05-11-2003, 03:16 AM   #15
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Looks right to me

Try it on a CDRW first

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backing Up RH 6.1 Lilbudha Red Hat 1 05-20-2005 07:12 AM
Moving /var/adm and /var/lib - why does it hurt? J_Szucs Linux - General 1 09-15-2004 07:46 PM
rm cannot remove /var/run/atd.pid and /var/run/xdm.pid danishmr Linux - Software 1 05-04-2004 09:01 AM
Backing up osx Linux - General 5 03-24-2003 03:09 PM
backing up ! Snake007uk Linux - General 1 07-14-2002 05:13 PM


All times are GMT -5. The time now is 05:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration