ee25310d |
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 contact the hcoop-sysadmin list for assistance.\r |
2 | \r |
3 | == Backups of AFS Volumes ==\r |
4 | \r |
5 | === Getting access ===\r |
6 | \r |
7 | {{{\r |
8 | ssh FOO_admin@deleuze.hcoop.net\r |
9 | \r |
10 | aklog -c megacz.com\r |
11 | }}}\r |
12 | \r |
13 | === Navigating the available backups ===\r |
14 | \r |
15 | {{{\r |
16 | cd /afs/megacz.com/hcoop-backup/\r |
17 | \r |
18 | cd $DESIRED_BACKUP_DATE\r |
19 | }}}\r |
20 | \r |
21 | === Restoring the volume dump to a volume with a new name ===\r |
22 | \r |
23 | {{{\r |
24 | cat $VOLNAME.dump.bz2.aescrypt | \\r |
25 | ccrypt -cdk /etc/backup-encryption-key | \\r |
26 | bunzip2 | \\r |
27 | vos restore deleuze /vicepa $VOLNAME.restored\r |
28 | }}}\r |
29 | \r |
30 | === Mounting the newly restored volume onto the filesystem ===\r |
31 | \r |
32 | {{{\r |
33 | fs mkm /afs/hcoop.net/.old/tmp-mount $VOLNAME.restored\r |
34 | vos release old\r |
35 | }}}\r |
36 | \r |
37 | === Restoring a particular file ===\r |
38 | \r |
39 | {{{\r |
40 | # examine /afs/hcoop.net/.old/tmp-mount\r |
41 | }}}\r |
42 | \r |
43 | === Unmounting the restored volume ===\r |
44 | \r |
45 | {{{\r |
46 | fs rm /afs/hcoop.net/.old/tmp-mount\r |
47 | }}}\r |
48 | \r |
49 | === Renaming the restored volume so it takes the place of the damaged/corrupted/erased volume ===\r |
50 | \r |
51 | Do this if you want to restore an entire volume. This deletes the old volume and replaces it with the backup.\r |
52 | \r |
53 | {{{\r |
54 | vos remove $VOLNAME\r |
55 | vos rename $VOLNAME.restored $VOLNAME\r |
56 | }}}\r |
57 | \r |
58 | === Removing the restored volume ===\r |
59 | \r |
60 | If you only wanted to restore a few files from the volume, you should remove the local copy of the backup volume when done.\r |
61 | \r |
62 | {{{\r |
63 | vos remove -id $VOLNAME.restored\r |
64 | }}}\r |
65 | \r |
66 | == Database Backups ==\r |
67 | \r |
68 | {{{\r |
69 | cat databases.tar.bz2.aescrypt | \\r |
70 | ccrypt -cdk /etc/backup-encryption-key | \\r |
71 | bunzip2 | \\r |
72 | tar -xvzf -\r |
73 | }}}\r |