4

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...

1
  • 1
    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.
    – Videonauth
    Jun 17, 2016 at 6:36

2 Answers 2

3
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.

5
  • 1
    dd will not work with audio cds as far as I am aware?
    – andrew.46
    Jun 17, 2016 at 6:27
  • 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.
    – DopeGhoti
    Jun 17, 2016 at 8:15
  • as per this answer, dd is not the preferred way: unix.stackexchange.com/a/14881 May 8, 2017 at 16:38
  • While that answer does show an alternative to dd, I don't see where it states that it is suboptimal. Care to expound?
    – DopeGhoti
    May 9, 2017 at 15:30
  • 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. Mar 17, 2021 at 9:15
0

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:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .