welcome: please sign in

Diff for "BackupInfo"

Differences between revisions 1 and 23 (spanning 22 versions)
Revision 1 as of 2007-08-25 21:09:57
Size: 282
Editor: dhcp-37-80
Comment:
Revision 23 as of 2009-08-24 23:06:29
Size: 2129
Editor: 78
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This page describes the procedure for accessing and using our off-site backups. Only admins can do this -- if you want to get some file or directory back from the dead and are not an admin, please [[https://bugzilla.hcoop.net/enter_bug.cgi|open a Bugzilla bug]].

<<TableOfContents>>

= Backups of AFS Volumes =

== Navigating the available backups ==

Using backup-manager:
Line 2: Line 12:
ssh FOO_admin@deleuze backup-manager list
backup-manager list YYYY.MM.DD
}}}
Line 4: Line 16:
aklog -c megacz.com == Retrieving a backup ==
Line 6: Line 18:
cd /afs/megacz.com/hcoop-backup/ (NOTE: $VOLNAME is not simply username, it is <db|mail|user>.USERNAME.dump.gz.aescrypt)
Line 8: Line 20:
cd $DESIRED_BACKUP_DATE Using backup-manager:
Line 10: Line 22:
cat $DESIRED_VOLUME_TO_RESTORE | \ {{{
backup-manager get YYYY.MM.DD $VOLNAME.dump.gz.aescrypt
}}}

== Restoring the volume dump to a volume with a new name ==

Using backup-manager:

{{{
backup-manager restore YYYY.MM.DD $VOLNAME.dump.gz.aescrypt $VOLNAME.restored
}}}

Manually:

{{{
cat /vicepa/hcoop-backups/restored/YYYY.MM.DD-$VOLNAME.dump.gz.aescrypt | \
Line 12: Line 39:
  bunzip2 | \
  vos restore deleuze /vicepa $DESIRED_NAME_OF_RESTORED_VOLUME
  gunzip | \
  vos restore deleuze /vicepa $VOLNAME.restored
Line 15: Line 42:

== Mounting the newly restored volume onto the filesystem ==

{{{
fs mkm /afs/hcoop.net/.old/tmp-mount $VOLNAME.restored
vos release old
}}}

== Restoring a particular file ==

{{{
# examine /afs/hcoop.net/.old/tmp-mount
}}}

== Unmounting the restored volume ==

{{{
fs rm /afs/hcoop.net/.old/tmp-mount
vos release old
}}}

== Renaming the restored volume so it takes the place of the damaged/corrupted/erased volume ==

Do this if you want to restore an entire volume. This deletes the old volume and replaces it with the backup.

{{{
vos remove $VOLNAME
vos rename $VOLNAME.restored $VOLNAME
}}}

== Removing the restored volume ==

If you only wanted to restore a few files from the volume, you should remove the local copy of the backup volume when done.

{{{
vos remove -id $VOLNAME.restored
}}}

= Database Backups =

{{{
cd /vicepa/hcoop-backups/restored
mkdir YYYY.MM.DD-db
cd YYYY.MM.DD-db
cat ../YYYY.MM.DD-databases.tar.gz.aescrypt | \
  ccrypt -cdk /etc/backup-encryption-key | \
  gunzip | \
  tar -xvzf -
}}}

This page describes the procedure for accessing and using our off-site backups. Only admins can do this -- if you want to get some file or directory back from the dead and are not an admin, please open a Bugzilla bug.

1. Backups of AFS Volumes

Using backup-manager:

backup-manager list
backup-manager list YYYY.MM.DD

1.2. Retrieving a backup

(NOTE: $VOLNAME is not simply username, it is <db|mail|user>.USERNAME.dump.gz.aescrypt)

Using backup-manager:

backup-manager get YYYY.MM.DD $VOLNAME.dump.gz.aescrypt

1.3. Restoring the volume dump to a volume with a new name

Using backup-manager:

backup-manager restore YYYY.MM.DD $VOLNAME.dump.gz.aescrypt $VOLNAME.restored

Manually:

cat /vicepa/hcoop-backups/restored/YYYY.MM.DD-$VOLNAME.dump.gz.aescrypt | \
  ccrypt -cdk /etc/backup-encryption-key | \
  gunzip | \
  vos restore deleuze /vicepa $VOLNAME.restored

1.4. Mounting the newly restored volume onto the filesystem

fs mkm /afs/hcoop.net/.old/tmp-mount $VOLNAME.restored
vos release old

1.5. Restoring a particular file

# examine /afs/hcoop.net/.old/tmp-mount

1.6. Unmounting the restored volume

fs rm /afs/hcoop.net/.old/tmp-mount
vos release old

1.7. Renaming the restored volume so it takes the place of the damaged/corrupted/erased volume

Do this if you want to restore an entire volume. This deletes the old volume and replaces it with the backup.

vos remove $VOLNAME
vos rename $VOLNAME.restored $VOLNAME

1.8. Removing the restored volume

If you only wanted to restore a few files from the volume, you should remove the local copy of the backup volume when done.

vos remove -id $VOLNAME.restored

2. Database Backups

cd /vicepa/hcoop-backups/restored
mkdir YYYY.MM.DD-db
cd YYYY.MM.DD-db
cat ../YYYY.MM.DD-databases.tar.gz.aescrypt | \
  ccrypt -cdk /etc/backup-encryption-key | \
  gunzip | \
  tar -xvzf -

BackupInfo (last edited 2019-03-31 19:34:13 by ClintonEbadi)