Backups - TCB In-House Configuration
We currently do the below backups regularly.
Primary File Servers
- Nightly backups: Nightly backups run automatically, and use ufsdump. We do level 4s nightly, keeping the last three, and level 2s on Sundays, keeping the last two. They can be restored with ufsrestore on riga/reno/rota/rolla (depending on where the file came from).
- Monthly backups: Monthly backups are to tape, and again use ufsdump (level 0).
- Twice-annual backups: Twice a year, a full GNU tar snapshot of the whole system is done.
Other File Servers
Nightly/Monthly:
- www (ruse) is backed up with ufsdump into /Backup/web
- mailhost (rama) is backed up with ufsdump into /Backup/mail
- toronto, edmonton, manitoba, and montreal are backed up with ufsdump into /Backup/systems/[appropriate_subdirectory] by their system type.
- Monthly backups on these systems should go sequentially onto rota's second tape drive.
- MySQL databases are backed up with mysqldump and gzip to `/Backup/web/mysql' nightly. The scripts are run on ruse.
We also do twice-annual backups of the above file systems to tape with GNU tar.
Restores
Standard procedure for restoring a file from ufsdump:
- Find out from the user:
- Which files need to be restored.
- When were these files were last modified (how many days ago). Be specific! You will need to know this information.
- Check the nightly backups to see if the file is there:
- Check last night's backups -
cd $DIR; ufsrestore if drive.4
- Check last week's backups -
cd $DIR; ufsrestore if drive.2
- Check last night's backups -
- Go to the tape ufsdumps.
- Find the appropriate files in the file listings in $DIR/log
- Load the appropriate tape(s) into the drive.
- Use 'mt fsf' to get to the right section of the tape
- Start the restore, changing tapes as instructed.
- Example:
ufsrestore if /dev/rmt/0cbn
- You may need to set the blocksize differently if the original
backup was done with a different blocksize. Example:
ufsrestore ifb /dev/rmt/0cbn 512
is necessary for our SDLT backups (2002-2004)
UFS nightly backups are stored in /Backup/[system], which are defined in the auto.Backup table. Other backups are stored in `/Backup/systems'.
Regular backups can be restored directly from the ufsdumps, using
ufsrestore: ufsrestore if filename
. The manual page as
more information on how this program works.
Tape backups are a bit tricker. You'll want to log into the appropriate machine, and then mount the appropriate tape. The tapes are labelled, and the tape changers are documented.
Hand-written logs are stored here. Make sure to keep them up-to-date. Printouts should be stored in both the machine room and the Sysadmin files.
Scripts
- Regular backup scripts:
- Generic (no snapshots): generic.0, generic.1, generic.daily
- Snapshot scripts get their own page
- Sample ufsdump.config files: Client, Server
- We are currently experimenting with ufsexpect, a script to automatically change tapes in ufsdump. If it works well, we will release the code publicly.
- Tar backup scripts
- No snapshots: backup-gtar
- Snapshots: snapshot-gtar
- Sample tardump.config files: Client, Server
We generally keep these scripts in /etc/backup
(servers) or
/home/backup/scripts
(clients). Nightly backups run out of
cron, monthly and twice-annual backups are run by hand.
Contact
References
Public
Internal
- Backup logs
- Disk Space listings
- Adminlog Archives of the backup runs (we get these with 'tee').