Changes between Version 3 and Version 4 of jupiter/backup
- Timestamp:
- 04/27/06 22:22:32 (21 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
jupiter/backup
v3 v4 3 3 backups for jupiter are done via regular rsync to an LVM volume on removable media. 4 4 5 == preparing the removable media ==5 == preparing the removable media (only do this once ever per disk!) == 6 6 7 7 You should only need to prepare the removable media once. DO NOT repeat this step on existing backup drives unless you want to destroy the backed-up data! … … 15 15 MAXEXTENTS=$(vgdisplay vgbackup0_jupiter | grep '^ Total PE' | awk '{print $3}') 16 16 lvcreate --name backup0 --size $MAXEXTENTS vgbackup0_jupiter 17 mkfs -t ext3 /dev/vgbackup0_jupiter/backup017 mkfs -t ext3 /dev/vgbackup0_jupiter/backup0 18 18 }}} 19 19 … … 21 21 22 22 since we should be rotating media, i expect that each volume group/logical volume will have an incrementing integer ID. e.g., the next one should be `vgbackup1_jupiter/backup1` 23 24 For now, we'll just remove the volume from the system so we can plug it in cleanly: 25 {{{ 26 lvchange -an /dev/vgbackup0_jupiter/backup0 27 vgexport vgbackup0_jupiter 28 }}} 29 30 You can remove the disk now, and then re-run `vgscan` to become aware of its absence. 31 32 == Plugging and noticing the backup volume == 33 34 Plug the disk back in and scan for it: 35 36 {{{ 37 vgscan 38 BACKUPVOL=$( vgs 2>/dev/null | awk '{ print $1 }' | grep 'vgbackup[0-9]*_jupiter') 39 echo "we'll be backing up with backup volume $BACKUPVOL" 40 }}} 41 42 in the example below, i'll be using `vgbackup0_jupiter` as the backup volume. 43 44 Import the backup volume (in case it was exported), and activate the logical volume on it: 45 46 {{{ 47 vgimport vgbackup0_jupiter 48 lvchange -ay vgbackup0_jupiter/backup0 49 }}} 23 50 24 51 == snapshotting the filesystem to back up == … … 73 100 }}} 74 101 75 deactivate the target volume :102 deactivate the target volume and tell the kernel to forget about its volume group: 76 103 77 104 {{{ 78 105 lvchange -an /dev/vgbackup0_jupiter/backup0 106 vgexport vgbackup0_jupiter 79 107 }}} 80 108 81 109 You should now be able to remove the disk. 110 111 == next time == 112
