userdoc:tt_tarsnap_online_backup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
userdoc:tt_tarsnap_online_backup [2018/09/29 10:10]
abelbeck [Restore to a New Install]
userdoc:tt_tarsnap_online_backup [2019/11/21 10:18] (current)
mkeuter [Restore to a New Install]
Line 148: Line 148:
  
   tarsnap-backup --uninstall-cronjob   tarsnap-backup --uninstall-cronjob
 +  
 +!!Tip:!! Don't use a cronjob between 02:00 and 03:00 in the night, because of DST switching :-).
  
 \\ \\
Line 175: Line 177:
 !!Note ->!! If you restore to a different media than the original, you need to run this command afterwards to re-create the [[https://www.tarsnap.com/cachedir.html|cache directory]] and to be able to create backups again ((This option is not listed in the program help!)): !!Note ->!! If you restore to a different media than the original, you need to run this command afterwards to re-create the [[https://www.tarsnap.com/cachedir.html|cache directory]] and to be able to create backups again ((This option is not listed in the program help!)):
  
-  tarsnap -fsck+  tarsnap --fsck
  
 \\ \\
Line 182: Line 184:
 It is quite useful to use a Tarsnap Backup to restore a machine following a new install.  This may occur after a disk failure or an upgrade to different hardware. It is quite useful to use a Tarsnap Backup to restore a machine following a new install.  This may occur after a disk failure or an upgrade to different hardware.
  
-!!Note ->!!  It is best practice that every instance (''--machine'') has a unique ''tarsnap.key'', and the previous disk/hardware is no longer used.+!!Note ->!!  It is best practice that every instance (''--machine'') has a unique ''tarsnap.key'', and the previous disk/hardware is no longer used with the same ''tarsnap.key''.
  
 +!!Warning ->!! You should not use a Tarsnap Backup to "clone" an active system to create a new install, as that will duplicate private keys (SSH, VPN, etc.) which must be unique across deployed systems.
 +
 +First, configure AstLinux using the standard **[[userdoc:new-install|New Install]]**.\\
 +Set the "Management Password" via the web interface, it may be different from what is archived in the Tarsnap Backup if you wish.
 +
 +Then, using the CLI, create the tarsnap directory:
 +
 +  mkdir /mnt/kd/tarsnap
 +
 +Copy the stored unique ''tarsnap.key'' to ''/mnt/kd/tarsnap/''
 +
 +Restore all the ''/mnt/kd'' files from the previous ''kd'' archive:
 +
 +  tarsnap -xvf machine-kd-archive -C /mnt/kd
 +
 +!!Note ->!! We are skipping restoring the ''machine-asturw-archive'' to ''/oldroot/mnt/asturw'' as it may be hardware specific and the "Management Password" was set above.
 +
 +Resync the tarsnap cache directory:
 +
 +  tarsnap --fsck
 +
 +Finally, Reboot the system to use the restored data.
  
 \\ \\
-===== Nuke All  +===== Nuke All Archives =====
-Archives =====+
  
 There may be a time when you want to delete all the stored archives associated with a ''tarsnap.key'' The ''--nuke'' option only applies to the ''/mnt/kd/tarsnap/tarsnap.key'' generated archives.  If you have other keys on other boxes, their associated archives will not be effected. There may be a time when you want to delete all the stored archives associated with a ''tarsnap.key'' The ''--nuke'' option only applies to the ''/mnt/kd/tarsnap/tarsnap.key'' generated archives.  If you have other keys on other boxes, their associated archives will not be effected.
  • userdoc/tt_tarsnap_online_backup.1538233816.txt.gz
  • Last modified: 2018/09/29 10:10
  • by abelbeck