Toolserver:Admin:Backups

This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it to a normal title and leave a redirect.

We take backups of the various important data stored on the toolserver.

All backups go to hemlock:/backups in the backup-zone. We are investigating options for off-site storage of backups (e.g. Amazon S3).

Home directories (/home) edit

  • backup script runs on either turnera or damiana, depending on which is the active NFS server.
  • backup script is /opt/local/bin/run-home-backup and runs from cron at 0005h.
  • backups are incremental, with a full backup on Tuesday
  • backups are copied to hemlock:/aux0/backups/YYYY-MM-DD/<hostname>/home/YYYY-MM-DD.genX.vx.gz

Restoring a deleted file edit

Sometimes users ask us to restore deleted files from backups. This is currently fairly intricate; use the following procedure:

Firstly, start with the most recent backup (i.e. yesterday's). If the file isn't found, go back to the previous day's and try again.

To extract a list of files with known names:

# cd /aux0/backups/2010-03-05/turnera/home
# gzip -dc 2010-03-05.gen3.vx.gz | vxrestore xvf - rriver/.viminfo
Verify tape and initialize maps
Dump     date: Fri Mar 05 05:00:03 2010
Dumped from: Thu Mar 04 05:00:02 2010
level 3 dump of /global/home-backup on /dev/vx/rdsk/disks/home
 Extract directories from tape
Initialize symbol table.
Make node ./rriver
Extract requested files
extract file ./rriver/.viminfo
Add links
 Set directory mode, owner, and times.
set owner/mode for '.'? [yn] n

This will extract the files into the current directory. Copy them to the appropriate user directories. You can specify as many filenames as you like on the vxrestore commandline.

Or, to interactively extract files if you don't know the exact name:

  • Invoke vxrestore in interactive mode:
# cd /aux0/backups/2010-03-05/turnera/home
# gzip -dc 2010-03-05.gen3.vx.gz | vxrestore vif -
Verify tape and initialize maps
Dump     date: Fri Mar 05 05:00:03 2010
Dumped from: Thu Mar 04 05:00:02 2010
level 3 dump of /global/home-backup on /dev/vx/rdsk/disks/home
 Extract directories from tape
Initialize symbol table.
 vxrestore > 
  • Use the cd and ls command to navigate around the backup tree. If the file you're looking for is found, add it to the extraction list:
 vxrestore > cd /river
 vxrestore > ls deletedfile
3789783 deletedfile
 vxrestore > add deletedfile
  • You can add as many files as you want. Once you're done, extract the files:
 vxrestore > extract
set owner/mode for '.'? [yn] n
 vxrestore > quit
  • This will extract the files into the current directory. Copy them to the appropriate user directories.

User/MMT databases edit

User databases are backup up nightly. The backup script is in /opt/local/bin/run-user-db-backups and runs on each server at 0330h. Backups are copied to hemlock:/aux0/backups/YYYY-MM-DD/<server>/user-databases/<database>.sql.gz.

LDAP edit

LDAP files are backup up by the current active LDAP server to hemlock:/aux0/backups/YYYY-MM-DD/<server>/ldap/ldap.tar.gz.