From Northwestern University Center for Atom-Probe Tomography
Jump to navigation Jump to search

We use amanda to backup machines to the network on Mon-Thurs evening.

If you are responsible for a machine in "Possibly To Backup", please move it to "To Backup" or "Don't Backup." If you have a machine which isn't on the list, feel free to add it.

To speed the process of getting everyone backed up, you can start setting yourself up & send me a note when you get stuck. I will help people as they request my help, with preference for desktops with important data & for which people have started the process.

Setup Instructions

Everyone should figure out what they want backed up. Backing up data is very important. Backing up applications is probably a waste of time and tape, as they can usually be reinstalled easily & cleanly from scratch.

Workstations/Desktops/Servers with Linux, Windows, or OS X

IP Address

Request a static IP address from Mark Seinw if you don't already have one. It will make locating your machine on the network MUCH easier. In the event he doesn't have any available, please use dyndnds to at least have a named address which the backup server will always be able to use to locate your machine.

AMANDA client

If you have a windows machine, follow the Cygwin instructions. If you have an OS X machine, follow the Mac OS X instructions. In either case, you will have to allow amanda through your software firewall.


After the client has been installed, I will add the domain name and/or IP address of your computer & test your client. If all goes smoothly, you won't need to do anything else: it will quietly back up your machine Mon-Thurs evening.

Laptops or OS 9 Machines

These are more of a headache, as they are most likely on dynamic IP and/or a native backup client won't work. It is also a problem that they won't be on the network at midnight when the other machines are backed up & choosing another time when they are all on and unused is difficult. I therefore recommend backing up your data to one of the servers which are backed up. You can do this manually or I can help you create a script to do it periodically (if your laptop is typically on the network & unused whenever you have lunch for example). We allow rsync over ssh. This can keep duplicate copies of your documents on ARC, which will then be backed up to tape.

Computers Being Backed Up

Computer's Name IP Address Method Directories Notes
ABEL Cygwin C:\Documents and Settings
ADAM Native /Users (except for kevin)
ARC Native /etc

/ (except for /tmp)

CAIN Cygwin C:\Documents and Settings
CHIMICHANGA DHCP (needs static!) Native /Users
CRUNCHER Cygwin C:\Documents and Settings
DAVIDDUNAND Cygwin:rsync over ssh C:\Documents and Settings

C:\Program Files\Qualcomm

DNS Dynamic IP Cygwin:rsync over ssh C:\Documents and Settings
EVE Cygwin C:\Documents and Settings
HOTMETALS Cygwin E:\ftp


C:\Program Files\Apache\web

INFILTRATOR Cygwin C:\Documents and Settings
ISAIAH Native /etc




JOB Cygwin C:\Documents and Settings
LEAP Cygwin C:\Documents and Settings


SONDE Cygwin C:\Documents and Settings


STOLKARTS Native /etc



To Backup

Don't Backup

Possibly To Backup


  • On ARC
    • smbldap-useradd -mc "John Smith" jsmith
  • On Client
    • Install rsync
    • Install ssh
    • ssh-keygen -P ""
  • On ARC
  • mkdir /u2/j/jsmith/.ssh
  • On Client
    • ssh .ssh/

Notes on Disaster Recovery

Tape Backup

As above, we use AMANDA to backup selected directories on NUCAPT machines every Monday-Thursday. AMANDA stores an index of files and folders that have been backed up.


amrecover can use this index to quickly and intuitively retrieve a subset of a backup for you. This solution will automatically prompt you for multiple tapes in the case of incremental backups, so is the best to start with.

# amrecover -C ARCvault24 -s -t
  • computer to restore from:
amrecover> sethost
  • "disk" to restore from (you can 'listdisk')
amrecover> setdisk /u1/karnesky
amrecover> add file_to_recover.txt
amrecover> extract


If amrecover has problems, amrestore may be used to retrieve whole backup images from individual tapes. First, load the tape you wish to restore from.


Finally, if amrestore has problems (usually only if AMANDA is unavailable or broken), the data can be manually retrieved with tar.

Copying files since a backup

It is probably better to pause an image or to copy it to a new file & mount it, rather than copying files directly from the disk. To only copy files modified since a certain date, say 2006-05-09:

  • touch -d 2006-05-09 2006-05-09.txt
  • find /path_to_old_drive -newer 2006-05-09.txt |cpio -pdumv /path_to_copy_to

Partition recovery

TestDisk is quite good at recovering partitions. It is available for most operating systems (even windows). gpart is a similar tool, but I don't have direct experience with it.


Imaging is very useful, as it will allow you to minimize reads of a dead drive and not write to it. You can work with the image or put an image on a new drive, rather than working with a broken drive (which could possibly break it more). Images also have an archival function & can be kept, even if a dead drive needs to be sent back for warranty fulfillment.

Confusingly, there are two very good programs to image drives that may be damaged. They also have similar names. Either program can first image the good sectors, so that you will get an image file as soon as possible. Ctrl-C will gracefully break imaging using either program & you can resume the image merely by executiny the same command (even between system changes and restarts).

GNU ddrescue

It appears that ddrescue has two principal advantages over the other program:

  1. It can store a logfile of bad sectors
  2. It is compiled, and so may be faster

To obtain ddrescue, one should be able to follow these steps:

(or otherwise install it from your distribution's package repository)

To run ddrescue:

  • cd /path_to_image_to
  • ddrescue /dev/DEVICE_TO_IMAGE ddrescue.img ddrescue.log

dd_rescue and dd_rhelp

dd_rescue (note the underscore) is what ddrescue (no underscore) was based on. It has the advantages of:

  1. maturity
  2. availability

In particular, dd_rescue is available directly on the Knoppix Linux LiveCD. You can probably still use ddrescue from Knoppix, but you'd have to follow th installation instructions above.

dd_rhelp will automate dd_rescue to quickly get the good sectors first & then spend more time trying to get bad sectors. It doesn't come with Knoppix. To install:

  1. wget
  2. tar -xvzf ddr_help-0.0.6.tar.gz && cd ddr_help-0.0.6
  3. make

And to run it:

  • ./dd_rhelp /dev/DEVICE_TO_IMAGE /path_to_image/dd_rhelp.img

Mounting an image

Partial images can often be mounted:

  • mount -o loop /path_to_image /mnt/loopback

Apparently, you must use losetup sometimes:

  • losetup /dev/loop0 /path_to_image
  • mount -o ro /dev/loop0 /mnt/loopback

Other Programs

  • spinrite


Load new tape in PowerVault 122T's read-write slot and launch screen so you can detach from the tape-writing session gracefully:

# screen

If needed:

# mt -f /dev/nsa1 rewind
# mt -f /dev/nsa1 erase
# mt -f /dev/nsa1 rewind

To archive:

# gtar -cvpf /dev/nsa1 --label="archive-2007-01_1: LSS:2006-04,2006-05; ARC:keith, temp-Dec-2006; FIM-CAMERA" .