Writing/Burning a data CD-R/DVD-R or DVD+RW in Unix/Linux

There's a lot of outdated information and confusion for system administrator's out there.

One annoying task for many an Administrator has been backing up data in Linux.  You don't need any GUI tools such as K3B or GnomeBaker.  Both are excellent tools but for veteran command line users working remotely, using the keyboard is a great and possibly automated way to save yourself pain and hassle.

At a later date we'll cover how scripting can automatically backup certain files to disc, verify them, catalogue them and even e-mail a report of the whole thing nightly or weekly.  It can even remind you the night before to make sure a blank disc has been inserted.

Requirements:

You'll need dvd+rw-tools.

On Debian variants including Ubuntu you would run:

apt-get install dvd+rw-tools

On Redhat Enterprise / Centos you would run:

yum install dvd+rw-tools

In Unix it would probably be the same port/package name, especially on FreeBSD.

No drivers or anything else are required at this point.

Now for the burning.

There are two ways of doing it, the traditional way is creating an iso image using mkisofs, but that is a pain and not even a possibility for some overfilled disk systems.  Many people believe there is no way to write on the fly, except to create an ISO with the data you'd like to burn.

Here's the tradtional way just for the sake of the oldschool:

mkisofs -r -o /root/myisoname.iso /var/www/vhosts

Now we use growisofs to actually burn the .iso:

growisofs -Z /dev/dvd1=/root/myisoname.iso

*Replace /dev/dvd1 with the device name of your burner

Watch as it burns:

   52887552/367337472 (14.4%) @3.9x, remaining 0:59 RBU 100.0% UBU  61.2%
   71925760/367337472 (19.6%) @4.1x, remaining 0:53 RBU 100.0% UBU  55.1%
   90112000/367337472 (24.5%) @3.9x, remaining 0:49 RBU 100.0% UBU  59.2%
  108363776/367337472 (29.5%) @4.0x, remaining 0:47 RBU  99.6% UBU  53.1%
  127303680/367337472 (34.7%) @4.1x, remaining 0:43 RBU 100.0% UBU  55.1%
  145555456/367337472 (39.6%) @4.0x, remaining 0:39 RBU 100.0% UBU  51.0%
  164265984/367337472 (44.7%) @4.1x, remaining 0:37 RBU  99.6% UBU  53.1%
  182779904/367337472 (49.8%) @4.0x, remaining 0:33 RBU 100.0% UBU  55.1%
  200900608/367337472 (54.7%) @3.9x, remaining 0:29 RBU 100.0% UBU  61.2%
  219971584/367337472 (59.9%) @4.1x, remaining 0:26 RBU  97.3% UBU  53.1%
  238157824/367337472 (64.8%) @3.9x, remaining 0:23 RBU 100.0% UBU  57.1%
 



The Sensible Way

There's no reason to use mkisofs and create an isofile, it wastes time and resources.

You could have just done this:

growisofs -M /dev/dvd1 -R -J /var/www/vhosts

*-R and -J are for Rockridge and Joliet extensions so you don't get annoying 8-character long, truncated filenames

 

*Actually my preferred way is this:

growisofs -M /dev/dvd1 -R -J -joliet-long -iso-level 3 /filenordir/name

-joliet-long gives you much longer filenames

-iso-level 3 helps too

This is the perfect setup, in both Linux, Windows and a DVD Player the filenames are shown as expected.


Tags:

dvd, rw, unix, linuxthere, outdated, confusion, administrator, task, backing, linux, gui, gnomebaker, veteran, users, remotely, keyboard, automated, hassle, ll, scripting, automatically, disc, verify, catalogue, nightly, weekly, inserted, requirements, debian, variants, ubuntu, apt, install, redhat, enterprise, centos, yum, freebsd, drivers, creating, iso, mkisofs, overfilled, disk, tradtional, oldschool, myisoname, var, www, vhosts, growisofs, z, dev, burner, remaining, rbu, ubu, sensible, isofile, wastes, rockridge, joliet, extensions, truncated, filenames, preferred, filenordir,

Latest Articles

  • How high can a Xeon CPU get?
  • bash fix PATH environment variable "command not found" solution
  • Ubuntu Linux Mint Debian Redhat Youtube Cannot Play HD or 4K videos, dropped frames or high CPU usage with Nvidia or AMD Driver
  • hostapd example configuration for high speed AC on 5GHz using WPA2
  • hostapd how to enable and use WPS to connect wireless devices like printers
  • Dell Server Workstation iDRAC Dead after Firmware Update Solution R720, R320, R730
  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint