Dvd and Cd
cd
finding the cd drive
cdrecord -scanbus You get a list like :
Decide on the one you want to use and remember the number.
Burning the image
So burning it to 'LITE-ON' 'LTR-12101B' would mean :
| burn command | |
|---|---|
dvd
ripping dvd
| pure copy | |
|---|---|
Or find out what the dvd device is, on power you need :
| dvd | |
|---|---|
burning (copying) dvd's
This is an ultrashort description of how to burn dvd's on linux: install growisofs
| burn dvd | |
|---|---|
get the data from the dvd as a whole
| get complete iso image | |
|---|---|
burning the image
| burn iso | |
|---|---|
If you want to burn a '''directory''':
| burn directory | |
|---|---|
Note that a command like this :
| this will just put a file called big.iso on dvd | |
|---|---|
Will not burn the image to disk but will make a dvd with big.iso on it as the only file
multi session
An easy way to make more use of a dvd's capacity for instance for backup is to incrementally write multiple sessions to the dvd.
You can actually mount the dvd and make it behave like a normal filesystem. For instance if you write file a in session 1 and file b in session 2 you get both of them in the same directory. Even deletion is possible, though i did not try it.
In my case i actually rather have all copies of the backups available so putting them in different directories with a file stamp works just as well.
starting
The first session is special, and should be started like this.
| first session | |
|---|---|
This burns the files inside the aide directory to the root of the cdrom, it does NOT create the aide directory as well.
| adding | |
|---|---|
more sessions
After that you can add sessions with -M (multi ?)
| new session | |
|---|---|
Now you have a disk with two sessions, and two alternatives to mounting the dvd. You can steer that with the session mount option. In /etc/fstab
| mount sessions | |
|---|---|
So this gives the state at session 0, only aide files are visible.
| one session visible | |
|---|---|
As you see, now both sessions appear in the same directory.
It seems only session 0 can be retrieved like this. All other sessions are merged into one after that no matter what you fill in session=[1-x]
examining sessions
You can get a lot of info by installing and using dvd+rw-tools :
This will list all written tracks and where they reside. It is important to find out if you can isolate a single track or at least a snapshot from earlier. This because a compromised system may be used to destroy the dvd attached and we still end up with no backup.
To get any session you want use this method :
| examine sessions | |
|---|---|
Now you will have to guess which one, or just try multiple times. Take the address and mount your section with this commandline :
You will now have the correct 'snapshot' up to that point, not the separate write done. I added the aide configuration files only once in the very first session, and these files will be present in all mounts !! Still this suffices for me, and i will do daily backups to be able to fixate this dvd as soon as possible.
These commands do not work on CD media only DVD. You could try similar operations with wodim and or xorriso.