How to create backup CDs of my audio CD collection from the command line?

5,141

Solution 1

To back up my audio CD collection from the commandline I start by installing the cdrtools package rather than use the Debian fork cdrkit. This replaces parts of the cdrkit package so just be aware that some adjustment may be required with other burning applications. To install Brandon's burning PPA:

sudo add-apt-repository ppa:brandonsnider/cdrtools
sudo apt-get update
sudo apt-get install cdda2wav cdrecord mkisofs

Next to test for the exact address of my CD drive:

cdda2wav -scanbus

On my system this gives 0,0,0 so this address is used to rip the CD and also perform a CDDA lookup:

cdda2wav dev=0,0,0 -vall cddb=0 -B -Owav

Then all that is required is to burn the files to a new, blank CD:

cdrecord dev=0,0,0 -v -dao -useinfo -text *.wav

And repeat, until I have safely backed up my collection. I have used cdrdao in the past but this technique has worked flawlessly for some time now...

References:

Solution 2

dd if=/dev/cdrom of=/path/to/imagename.iso bs=2048

The above command will make a burnable ISO image of whatever is in your optical drive.

Share:
5,141

Related videos on Youtube

andrew.46
Author by

andrew.46

The Tao is close, but you look far away. Life is simple yet you look for problems...

Updated on September 18, 2022

Comments

  • andrew.46
    andrew.46 almost 2 years

    Using tools available to Xenial Xerus LTS how can I copy an audio CD to a backup CD using purely command line tools?

    AskUbuntu questions have the most part so far dealt with command line copying of data CDs and DVDs, I am only interested in audio CDs which require different treatment...

    • Videonauth
      Videonauth about 8 years
      You might want to check out brasero, it has a command line API as well, still I can't give you an answer on how to, never used it myself yet.
  • andrew.46
    andrew.46 about 8 years
    dd will not work with audio cds as far as I am aware?
  • DopeGhoti
    DopeGhoti about 8 years
    I've used it several times. Blocks are blocks; audio CDs are just data in the form of redbook audio. dd doesn't care about what the data are; it just looks at ones and zeroes on the block device or file.
  • R.D. Frable
    R.D. Frable about 7 years
    as per this answer, dd is not the preferred way: unix.stackexchange.com/a/14881
  • DopeGhoti
    DopeGhoti about 7 years
    While that answer does show an alternative to dd, I don't see where it states that it is suboptimal. Care to expound?
  • Per Christian Henden
    Per Christian Henden over 3 years
    cdda2wav (and the older cdparanoia) has additional code for handling read errors from CDs, so it could give better results in the case where there are scratches on the audio CD.