MBG wiki | RecentChanges | Blog | 2021-09-24 | 2021-09-23

Backup, backup, backup ... using the server's DVD

Read first the Backup, backup, backup ... section, then come back.


You can only use the server's DVD writer if you are logged on the server. To do that use ssh server from the machine you work from (and then use your password to login). The files to be backed-up must be on server's disk. If your data are inside the /work directory, fear not : the /work directory is accessible on the server's /tmp. To make this clear : if the directory /work/myself/2backup contains the data you want to back-up, then do (after logging-in to server) cd /tmp/myself and you should see your files and directories.

Preparing a 'closed' (not multisession) DVD

sudo growisofs -Z /dev/scd1 -R -J -udf  <files>

where files can be a single file (say, a tar archive), or the name of a directory.

Be careful : Single layer DVDs can fit a maximum of 4,700,000,000 bytes (~4.4 GBytes). BUT, no single file can be larger than exactly 4 GBytes (4,294,967,296 bytes). If you want to write a file which is larger than 4 GBytes you will have to split it (using for example split, or in the case of DCD files, catdcd).

To confirm that everything has been written correctly :

mount /mnt/dvd
cd /mnt/dvd
diff <file1> /tmp/mydir/<file1>
diff -r <dir1> /tmp/mydir/<dir1>

Preparing a multisession DVD

NOTE WELL : No file should be larger than 2 GBytes

For the first session (the first time you write something) use :

sudo growisofs -Z /dev/scd1 -R -J <files>

where files can be a single file (say, a tar archive), or the name of a directory.

For all the other sessions, use :

sudo growisofs -M /dev/scd1 -R -J <files>

To confirm that everything has been written correctly :

mount /mnt/cdrom1
cd /mnt/cdrom1
diff <file1> /tmp/mydir/<file1>
diff -r <dir1> /tmp/mydir/<dir1>