backing up files/directories to CDs

backing up files/directories to CDs

Post by Rajesh Radhakrishna » Tue, 20 Nov 2001 01:43:46



Hi,

I want to create backups of my files/directories on my Mandrake-8
system.

I am new to burning files onto CDs using 'cdrecord' so I just tried
burning an avi file onto a CD-R

------------------------
cdrecord -v speed=8 dev=0,0,0 -data movie.avi

Cdrecord 1.9 (i586-mandrake-linux-gnu) Copyright (C) 1995-2000 J?rg
Schilling
TOC Type: 1 = CD-ROM
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 3.1.17
Using libscg version 'schily-0.1'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 1
Vendor_info    : 'SONY    '
Identifikation : 'CD-RW  CRX160E  '
Revision       : '1.0e'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags   : SWABAUDIO
Drive buf size : 4183552 = 4085 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data  514 MB
Total size:     591 MB (58:35.29) = 263647 sectors
Lout start:     591 MB (58:37/22) = 263647 sectors
Current Secsize: 2048
ATIP info from disk:
  Indicated writing power: 5
  Is not unrestricted
  Is not erasable
  Disk sub type: Medium Type A, high Beta category (A+) (3)
  ATIP start of lead in:  -11634 (97:26/66)
  ATIP start of lead out: 359849 (79:59/74)
Disk type:    Short strategy type (Phthalocyanine or similar)
Manuf. index: 3
Manufacturer: CMC Magnetics Corporation
Blocks total: 359849 Blocks current: 359849 Blocks remaining: 96202
Starting to write CD/DVD at speed 8 in write mode for single session.
Last chance to quit, starting real write in 1 seconds.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
Starting new track at sector: 0
Track 01: 514 of 514 MB written (fifo 100%).
Track 01: Total bytes read/written: 539944960/539944960 (263645
sectors).
Writing  time:  443.601s
Fixating...
Fixating time:   32.388s
cdrecord: fifo had 8505 puts and 8505 gets.
cdrecord: fifo was 0 times empty and 8363 times full, min fill was 29%.
------------------------

after the burn was done I can't access the file:

ls /mnt/cdrom
ls: /mnt/cdrom: Input/output error

i get this error...now a little worried if i can't retrieve the files i
burnt on my CD. should i convert my files to iso-9660 format before
burning them?

Q: I have created .tgz of all the releavant files and directories in my
system and want to know of a way to burn them on a CD-R and be able to
retrieve them easily.

Thanks
Rajesh

 
 
 

backing up files/directories to CDs

Post by Noble Peppe » Mon, 19 Nov 2001 19:48:03


Here's all you need to know:
http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html

 
 
 

backing up files/directories to CDs

Post by Dances With Cro » Tue, 20 Nov 2001 02:19:35


On Sun, 18 Nov 2001 11:43:46 -0500, Rajesh Radhakrishnan staggered into
the Black Sun and said:

Quote:>I want to create backups of my files/directories on my Mandrake-8
>system.

>I am new to burning files onto CDs using 'cdrecord' so I just tried
>burning an avi file onto a CD-R

>cdrecord -v speed=8 dev=0,0,0 -data movie.avi
[snip]
>after the burn was done I can't access the file:

>ls /mnt/cdrom
>ls: /mnt/cdrom: Input/output error

>i get this error...now a little worried if i can't retrieve the files i
>burnt on my CD. should i convert my files to iso-9660 format before
>burning them?

Did you read the CD-Writing-HOWTO, or indeed anything about burning CDs?

Burning one file directly to CD will *not* work in the general case.
Normal data CDs have a filesystem of type ISO9660 on them, and when the
kernel attempts to mount a CD-ROM, the first filesystem it tries is
ISO9660--then it will try ext2, VFAT, ReiserFS, etc. if those
filesystems are present.

For general purposes, ISO9660 (with Rock Ridge and Joliet extensions) is
the filesystem to use on CD-R(W) backups.  That said, you *may* be able
to retrieve the single file you burned to CD by doing this:

dd if=/dev/cdrom of=/somewhere/movie.avi bs=16k

(dd bypasses the filesystem layer, so the kernel will not complain.)

Quote:>Q: I have created .tgz of all the releavant files and directories in my
>system and want to know of a way to burn them on a CD-R and be able to
>retrieve them easily.

Put the tarballs in /path/to/dir (note that you should only try 640M or
less of tarballs at once unless you're using 700M/80-minute CD-Rs) and
then do:

mkisofs -r -J /path/to/dir | cdrecord -v speed=X dev=Y -

mkisofs is *required* unless you are creating audio CDs or VCDs.  Well,
it isn't, but unless you use it, reading your data back is much harder.
There are also a number of semi-automated backup scripts/utilities
available if you search http://freshmeat.net/ for "CD Backup".

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /
http://www.brainbench.com     /  "He is a rhythmic movement of the
-----------------------------/    penguins, is Tux." --MegaHAL

 
 
 

backing up files/directories to CDs

Post by Joachim Feis » Tue, 20 Nov 2001 05:21:14



> Hi,

> I want to create backups of my files/directories on my Mandrake-8
> system.

> I am new to burning files onto CDs using 'cdrecord' so I just tried
> burning an avi file onto a CD-R

> ------------------------
> cdrecord -v speed=8 dev=0,0,0 -data movie.avi
...

> after the burn was done I can't access the file:

> ls /mnt/cdrom
> ls: /mnt/cdrom: Input/output error

> i get this error...now a little worried if i can't retrieve the files i
> burnt on my CD. should i convert my files to iso-9660 format before
> burning them?

> Q: I have created .tgz of all the releavant files and directories in my
> system and want to know of a way to burn them on a CD-R and be able to
> retrieve them easily.

Hmm, you need to create a filesystem for the CD image.
See man mkisofs and man cdrecord.
It is much easier if you use one of the GUI frontends. You can
find a good selection at http://sites.inka.de/~W1752/cdrecord/frontend.en.html

-Joe

 
 
 

backing up files/directories to CDs

Post by Rajesh Radhakrishna » Wed, 21 Nov 2001 01:08:12


Hi,

thanks for your replies. i read the howto and created the .iso of the
files/directories i wanted to back up.

however some of the .tar and .tar.gz files that i backed up got
corrupted and both tar and gunzip complained.

is there a good file format like .bz2 or like that doesn't get
corrupted.

thanks
rajesh


> On Sun, 18 Nov 2001 11:43:46 -0500, Rajesh Radhakrishnan staggered into
> the Black Sun and said:
> >I want to create backups of my files/directories on my Mandrake-8
> >system.

> >I am new to burning files onto CDs using 'cdrecord' so I just tried
> >burning an avi file onto a CD-R

> >cdrecord -v speed=8 dev=0,0,0 -data movie.avi
> [snip]
> >after the burn was done I can't access the file:

> >ls /mnt/cdrom
> >ls: /mnt/cdrom: Input/output error

> >i get this error...now a little worried if i can't retrieve the files i
> >burnt on my CD. should i convert my files to iso-9660 format before
> >burning them?

> Did you read the CD-Writing-HOWTO, or indeed anything about burning CDs?

> Burning one file directly to CD will *not* work in the general case.
> Normal data CDs have a filesystem of type ISO9660 on them, and when the
> kernel attempts to mount a CD-ROM, the first filesystem it tries is
> ISO9660--then it will try ext2, VFAT, ReiserFS, etc. if those
> filesystems are present.

> For general purposes, ISO9660 (with Rock Ridge and Joliet extensions) is
> the filesystem to use on CD-R(W) backups.  That said, you *may* be able
> to retrieve the single file you burned to CD by doing this:

> dd if=/dev/cdrom of=/somewhere/movie.avi bs=16k

> (dd bypasses the filesystem layer, so the kernel will not complain.)

> >Q: I have created .tgz of all the releavant files and directories in my
> >system and want to know of a way to burn them on a CD-R and be able to
> >retrieve them easily.

> Put the tarballs in /path/to/dir (note that you should only try 640M or
> less of tarballs at once unless you're using 700M/80-minute CD-Rs) and
> then do:

> mkisofs -r -J /path/to/dir | cdrecord -v speed=X dev=Y -

> mkisofs is *required* unless you are creating audio CDs or VCDs.  Well,
> it isn't, but unless you use it, reading your data back is much harder.
> There are also a number of semi-automated backup scripts/utilities
> available if you search http://freshmeat.net/ for "CD Backup".

> --
> Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
> Brainbench MVP for Linux Admin /
> http://www.brainbench.com     /  "He is a rhythmic movement of the
> -----------------------------/    penguins, is Tux." --MegaHAL

 
 
 

backing up files/directories to CDs

Post by Joachim Feis » Wed, 21 Nov 2001 01:57:12



> Hi,

> thanks for your replies. i read the howto and created the .iso of the
> files/directories i wanted to back up.

> however some of the .tar and .tar.gz files that i backed up got
> corrupted and both tar and gunzip complained.

> is there a good file format like .bz2 or like that doesn't get
> corrupted.

Backing up files doesn't corrupt them.
If the files got corrupted, then it most likely happened before
you backed them up.

-Joe

 
 
 

backing up files/directories to CDs

Post by Stephen Ran » Wed, 21 Nov 2001 02:11:52


[ ... ]

Quote:> is there a good file format like .bz2 or like that doesn't get
> corrupted.

Hmmm... cpio is supposed to be better at surviving corruption, but
there's no format that ``doesn't get corrupted'': it's what you do
with it that counts, not what the format is.

Stephen

--
1006189838

 
 
 

backing up files/directories to CDs

Post by King Nothin » Wed, 21 Nov 2001 12:30:40




> [ ... ]
>> is there a good file format like .bz2 or like that doesn't get
>> corrupted.

> Hmmm... cpio is supposed to be better at surviving corruption, but
> there's no format that ``doesn't get corrupted'': it's what you do
> with it that counts, not what the format is.

True. I had a whole CD ruined (corrupted) by Diwrecked CD in Windows 2000.
I then uninstalled it and got Nero.
--
Kris aka Ogden Computer Guy
I'm not a Black Hat; I'm not a White Hat. I'm a Red Hat :-)
9/11/2001
 
 
 

backing up files/directories to CDs

Post by Rajesh Radhakrishna » Wed, 21 Nov 2001 22:28:50


didn't do anything special. created .tar or .tar.gz of the files and
directories i wanted and created an .iso file with mkiofs. then burnt it
on a CD-RW with 'cdrecord ... -data'. when i retreived the .tar  file, i
got errors from tar.

don't know where the error was seeded in...

regards

rajesh



> > Hi,

> > thanks for your replies. i read the howto and created the .iso of the
> > files/directories i wanted to back up.

> > however some of the .tar and .tar.gz files that i backed up got
> > corrupted and both tar and gunzip complained.

> > is there a good file format like .bz2 or like that doesn't get
> > corrupted.

> Backing up files doesn't corrupt them.
> If the files got corrupted, then it most likely happened before
> you backed them up.

> -Joe

 
 
 

backing up files/directories to CDs

Post by Dave Bro » Wed, 21 Nov 2001 23:54:38



> didn't do anything special. created .tar or .tar.gz of the files and
> directories i wanted and created an .iso file with mkiofs. then burnt it
> on a CD-RW with 'cdrecord ... -data'. when i retreived the .tar  file, i
> got errors from tar.

> don't know where the error was seeded in...

I've given up on CDRW media.  Maybe my burners, but I've run into too many
bad recordings.  CDR's are to cheap to worry about re-use.

--
Dave Brown  Austin, TX

 
 
 

backing up files/directories to CDs

Post by Eric Y. Cha » Thu, 22 Nov 2001 05:00:57


Backing up files can corrupt them.  Check the backed up files against the
originals.  If they bit by bit compare and you cannot untar/un gzip the
backed up files, it is likely that the originals are bad.  If the bits
differ, even slightly, there will be a problem.

.tar, .tar.gz and .bz are not robust to bit errors.  Find out where the
files differ and by how much.  Then, use a real error correcting protocol
to save the files.  This kind of protocol stores some redundant information
so that when your system inaccurately records the data, there is enough
redundancy to recover.

Look for "error correcting codes" or checksum or something like that.
Or, fix your hardware/software.  Are you running something else in the
background?

: didn't do anything special. created .tar or .tar.gz of the files and
: directories i wanted and created an .iso file with mkiofs. then burnt it
: on a CD-RW with 'cdrecord ... -data'. when i retreived the .tar  file, i
: got errors from tar.

: don't know where the error was seeded in...

: regards

: rajesh

: >

: > >
: > > Hi,
: > >
: > > thanks for your replies. i read the howto and created the .iso of the
: > > files/directories i wanted to back up.
: > >
: > > however some of the .tar and .tar.gz files that i backed up got
: > > corrupted and both tar and gunzip complained.
: > >
: > > is there a good file format like .bz2 or like that doesn't get
: > > corrupted.
: >
: > Backing up files doesn't corrupt them.
: > If the files got corrupted, then it most likely happened before
: > you backed them up.
: >
: > -Joe

 
 
 

backing up files/directories to CDs

Post by Joachim Feis » Thu, 22 Nov 2001 09:29:14



> Backing up files can corrupt them.

Care to explain why?
The simple act of creating a backup (i.e., copying files) does not corrupt files.
You can only run into problems if you have buggy software, or if the medium you
back it up to has flaws, but that applies to any file copy operation.
I assume that in this case the error is not in the backup, but in the creation
of the tar files. I have seen all kinds of weird files with extension .tar
that weren't actual tar files. Usually happens when the tar command is applied
wrong.

-Joe

 
 
 

backing up files/directories to CDs

Post by Rajesh Radhakrishna » Fri, 23 Nov 2001 04:09:13


well, here is how i create my tar files:

tar cvf my_archive.tar * dir/*

or

tar zcvf my_archive.tar.gz * dir/*

this is the most basic way of creating the archives. i used the
'cdrecord' and 'mkiosfs' that came with Mandrake-8.0.

Cdrecord 1.9 (i586-mandrake-linux-gnu) Copyright (C) 1995-2000 J?rg
Schilling

mkisofs 1.13 (i586-mandrake-linux-gnu)

thats about it....

 
 
 

backing up files/directories to CDs

Post by Joachim Feis » Fri, 23 Nov 2001 04:38:03



> well, here is how i create my tar files:

> tar cvf my_archive.tar * dir/*

> or

> tar zcvf my_archive.tar.gz * dir/*

Well, that looks ok.

Quote:> this is the most basic way of creating the archives. i used the
> 'cdrecord' and 'mkiosfs' that came with Mandrake-8.0.

> Cdrecord 1.9 (i586-mandrake-linux-gnu) Copyright (C) 1995-2000 J?rg
> Schilling

> mkisofs 1.13 (i586-mandrake-linux-gnu)

> thats about it....

Ok, let's go step by step:
- after creating the archives, you should be able to view the contents
with tar tzvf my_archive.tar.gz
- after running mkisofs, you can mount the iso file locally, e.g., with
mount -t iso9660 -o loop my_isofile.iso /mnt
(provided you have the loopback capability enabled in the kernel or loaded
a module for it).
You can then just cd /mnt and do the tar tzvf my_archive.tar.gz again.
- finally, after unmounting the iso file, you can burn it, and then mount
the CD.
Depending on which step fails, the problem is at least narrowed down.

-Joe

 
 
 

1. APC USB ups, Back-UPS ES series, 2.5.68

(Please cc: me on reply)

I'm wanting to get this new toy up and running.  I've installed apcupsd,
but it doesn't want to work well with my kernel (2.5.68) or somewhat.

When apcupsd tries to open the hiddev, open() gets an ENODEV.  Is
apcupsd doing something wrong or is 2.5.68 doing something wrong?

~# dmesg
hub 1-0:0: debounce: port 1: delay 100ms stable 4 status 0x301
hub 1-0:0: new USB device on port 1, assigned address 4
usb 1-1: new device strings: Mfr=3, Product=1, SerialNumber=2
usb 1-1: Product: Back-UPS ES 350 FW:800.e3.D USB FW:e3
usb 1-1: Manufacturer: APC
usb 1-1: SerialNumber: AB0238241677
usb 1-1: usb_new_device - registering interface 1-1:0
hid 1-1:0: usb_device_probe
hid 1-1:0: usb_device_probe - got id
drivers/usb/core/file.c: asking for 1 minors, starting at 96
drivers/usb/core/file.c: found a minor chunk free, starting at 96
hiddev96: USB HID v1.10 Device [APC Back-UPS ES 350 FW:800.e3.D USB
FW:e3] on usb-00:07.2-1

~# ls -l /dev/usb/hid
total 0
crw-r--r--    1 root     root     180, 192 Dec 31  1969 hiddev96
crw-r--r--    1 root     root     180, 193 Dec 31  1969 hiddev97

~# strace -f apcupsd (trimmed)
[...]
open("/dev/usb/hid/hiddev95", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/dev/usb/hid/hiddev96", O_RDONLY) = -1 ENODEV (No such device)
open("/dev/usb/hid/hiddev97", O_RDONLY) = -1 ENODEV (No such device)
open("/dev/usb/hid/hiddev98", O_RDONLY) = -1 ENOENT (No such file or
directory)
write(2, "Couldn\'t find UPS device or no p"..., 43Couldn't find UPS
device or no permission.
) = 43
_exit(1)                                = ?

ref: http://www.sibbald.com/apcupsd/manual/usb.html
apcupsd version: 3.10.5
Linux kernel: 2.5.68

David
p.s. apcupsd needs patched to handle hiddev from 96 on (minor allocated by kernel)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. DNS and sendmail problem

3. UPS Woes (APC Back-UPS Pro)

4. PPTP under linux...

5. APC Back-UPS 400, updated howto for UPS?

6. framebuffer device AND keyboard

7. Shape Ups,Men's Shape Ups,Men's Skechers Shape Ups - new styles!

8. installing modules to ($PREFIX)/lib/modules/2.....

9. how to "tar" file back to other directory??

10. Backing up files to CD...

11. Tape drive for back-ups, RH 5.1

12. apcupsd and Back-Ups 500

13. powerd with APC Back-UPS Pro?