Backing up and restoring Arch archives

tla's facilities for mirroring archives may also be used as a reliable way of taking backups. Suppose your main development archive (foo@example.com--stuff-2004) is located at sftp://arch-server.example.com/home/arch/stuff/2004. Many developers contribute day and night to this archive[0], so there's always the risk of new revisions being committed in the middle of a backup, regardless of when you schedule your backup. You have a back-up server called vault.example.com, and wish to back up your Arch archive daily without interrupting development.

First you log in to vault and create a mirror:

vault:~$ tla register-archive foo@example.com--stuff-2004-SOURCE sftp://arch-server.example.com/home/arch/stuff/2004
vault:~$ tla make-archive --mirror-from foo@example.com--stuff-2004-SOURCE /backups/stuff-2004

You can then synchronise the mirror on vault with

vault:~$ tla archive-mirror foo@example.com--stuff-2004 

wait for this to complete, and backup the /backups/stuff-2004 using whatever mechanism you wish.

Should you ever need to restore from the backup, you need merely tar up the /backups/stuff-2004 directory (or retrieve same from your tapes), transfer it back to arch-server and remove the file called 'mirror' that you will find in its =meta-info directory. The last step is necessary to allow developers to commit to it again, since committing to mirrors is normally forbidden.

Backing up and restoring Arch archives (last edited 2008-07-21 13:03:00 by 64)