multicd
Introduction
I wanted to backup my entire Linux system. I wanted to do it by making
direct copies of the files (no archiving or compression), so if I just
wanted to look at one of the files on one of the CDs, I could. This also
makes it very easy to restore from backups. Backing up my entire Linux
system takes more than one CD, so I was running the du command
on a bunch of directories to see what would fit on which CD. This was very
tedious and time consuming, so I wrote multicd to do this work for me.
Description
multicd has a fairly large number of options. It can be configured to run in a variety of ways. Here are some of the more interesting features:
multicd can run in an interactive or non-interactive mode.
- Interactive mode assumes that you will be burning more than one disc. You tell multicd which files to backup, and it will prompt you to insert a disc each time it is ready to burn a new one.
- Non-interactive mode copies the files to an image file, and then burns just a single CD. It assumes you have left a CD in your burner. This is useful if you want to call multicd from a script or a cron job.
multicd can be configured to run in a
multi-threaded mode. If your machine can handle it, you can burn one CD
image while another image is having the next set of files copied to it.
This option can be disabled on slower machines. Since non-interactive
mode burns only one CD, multi-threading is only used in interactive
mode. When running with this feature enabled, it's best to redirect
stderr
somewhere. I send the output of cdrecord, along with some other status
information, to stderr. When cdrecord is running in the background at the
same time as the main process, their output will overlap. I usually do
something like:
multicd 2> err
and then in another terminal I do:
tail -f err
so that I can watch the progress of cdrecord.
Selecting which files to backup is simple and powerful. For
example, you can tell it to backup / (everything), but have it
exclude certain sub directories like /tmp /dev /mnt /usr/tmp
/proc, etc. It only backs up regular files, directories, and
symlinks. All other files are automatically skipped. Also, if there is a
problem reading a file because of permissions or whatever, it is
automatically skipped. A warning is printed to standard error whenever a file is
skipped.
multicd can be configured to run in a mode where it simply creates a series of image files, without burning anything to discs. Some people find this useful if they want to burn the CDs later.
This was developed on Linux, but should run fine on any Unix-like system.
Configuration
The documentation in the sample config file that's in the package explains all of the options that are available. multicd can get configuration information from any of three places:
- The global configuration file:
/etc/multicdrc - A per-user configuration file called
.multicdrc, located in the user's home directory. - From the command line.
~/.multicdrc will override values from the global file, and command
line options will override both of the other two.
Prerequisites
- A Unix-like operating system.
- The cdrecord program.
- Perl, version 5 or newer.
Download and Install
- Download the latest version:
- tarball: multicd-1.7.5.tar.gz
- Debian package page
- Or
apt-get install multicd
- Or
- For the tarball, unpack the archive:
gzip -dc multicd.tar.gz | tar xf -, or install the debian package. - Read the documentation in
sample_multicdrc, then either install a config file in the global location:cp sample_multicdrc /etc/multicdrc, or in your home direcory:cp sample_multicdrc ~/.multicdrc, and then make sure that you change what you need to in your configuration. - Make sure
multicdis executable and in your$PATH.
News
- 02/07/2005: Version 1.7.5 released. Changes made:
- Preferred chown(1) syntax seems to be "uid:gid" instead of "uid.gid".
- 13/02/2005: Version 1.7.4 released. Changes made:
- Added --no-dereference for chown of symlinks.
- 14/12/2004: Version 1.7.3 released. Changes made:
- Added support for burning to DVD. Previously, there were a couple of regular integer variables for storing the disc size in bytes. These would overflow for a DVD, so I used Math::BigInt objects. This was the only thing holding multicd back from supporting DVD writing. The real disc burning is done by external programs like cdrecord.
- Added a "since" option to backup only those files that have changed since a given time.
- 30/04/2003: Version 1.7.2 released. Changes made:
- Fixed a bug in config file parsing.
- Changed the format of the date on index files.
- 22/01/2003: Version 1.7.1 released. Changes made:
- Fixed a bug that caused "disk full" errors to be interpreted as some other problem.
- 20/01/2003: Version 1.7.0 released. Changes made:
- Added the ability to compress the files before they're copied to the backup filesystem image. See the compress and compress_level options.
- Fixed a minor bug.
- Fixed a bug where the month in the date on the index_file would be one less than it should be.
- 01/11/2002: Version 1.6.5 released. Changes made:
- 10/7/2002: Version 1.6.4 released. Changes made:
- Fixed a bug submitted by the Debian people.
- Fixed about a year's worth of accumulated little things.
- 15/07/2001: Version 1.6.3 released. Changes made:
- Fixed a security issue. Depending on the circumstances, image files may have been created with insecure permissions.
- Made the default configuration a little more user-friendly, and made multicd a little easier to setup the first time it is used.
- 07/07/2001: Version 1.6.2 released. Changes made:
- Fixed a problem with the way the owner of a symbolic link is set.
- 04/07/2001: Version 1.6.1 released. Changes made:
- Fixed problem that occured when file names in a config file contained spaces. File names can now be enclosed in quotes for this.
- A couple of other minor bugs fixed.
- 24/06/2001: I added an FAQ page.
- 07/06/2001: Version 1.6 released. Changes made:
- multicd can now be made to write out a list of the files on each backup CD.
- Can now retry failed burn attempts.
- Image files and the image file mount point are excluded from the backups automatically. In the past, you had to manually say that it shouldn't try to back them up.
- Added a --check-config option. This verifies that its configuration is at least correct enough to allow multicd to run.
- When read errors occur, the source file is skipped with a warning. In the past, the program would exit when it encountered a read error.
- 05/05/2001: Version 1.5 released. Changes made:
- Added support for global configuration file.
- Does a little check to make sure that it doesn't attempt to add a file that's larger than a CD to the backup image.
- Added ability to run a command after a CD is done burning (for example, play a sound, or eject the CD).
- Finally got around to making the GPL status official.
- 20/04/2001: Still alive. Sort of.
I've been crazy busy at school. I do plan to work on this project a little more, and do some of the things I said I would, but I just haven't had the time. I'm graduating soon, so we'll see what happens... - 2/7/2001: Version 1.02 released. Changes made:
- Fixed minor bugs, changed some minor features, made some things easier to use.
- 21/01/2001: Version 1.01 released. Changes made:
- Fixed one major bug: It only worked with Perl version 5.6 or newer. I made multicd so it is now compatible with any version of Perl 5.
- Fixed some minor bugs.
- Changed the way the user specifies the name/location of image files.
- Added option that allows user to create a series of disc images without burning any of them.
- Added option so the user can skip being prompted for the first disc.
- 15/01/2001: Version 1.0 released.
License
multicd is copyright © 2001 by Daniel Born (
)
and is released under the
GNU General Public License Version 2.
Author
If you find this program useful, let me know. If you find a bug, let me know, and I will fix it. Also, if you want a certain feature added, send me an email and I will consider it. My name is Dan Born. Feel free to contact me.
- email:

- web page: http://danborn.net/