github.com/rogpeppe/juju@v0.0.0-20140613142852-6337964b789e/doc/backup_and_restore.txt (about) 1 Backup and restore 2 ================== 3 4 Currently backup and restore is run by very different pieces of software. 5 This doc is intended as an overview of both since, at least in the current 6 status, changes in juju are prone to break both. 7 8 Backup 9 ------ 10 11 juju-backup is a bash script that runs remote actions on the state-server 12 and fetches the result in the form of a tgz file named after the date. 13 The process gathers various files relevant to the server such as: 14 * /var/log/juju 15 * /var/lib/juju 16 * ~/.ssh/ 17 Also it creates a dump of the mongo db, for this it stops the db for a moment, 18 it is a rather short period of time, depending on how much it takes to dump your 19 whole db (so backup time most likely should grow over time), during this period 20 running juju commands will fail (running services should not be affected) 21 which makes it less than ideal to be run as often as a backup process should be. 22 23 Restore 24 ------- 25 26 juju-restore is a juju plugin that, if no state-server is present, will 27 bootstrap a new node in safe mode (ProvisionerSafeMode reports whether the provisioner 28 should not destroy machines it does not know about) then upload to the tgz backup file 29 and: 30 * Stop juju-db 31 * Stop jujud-machine 32 * Loads the backed up db in place of the recently created one 33 * Untars the fs files into the current machine 34 * Runs a set of bash scripts that replace the dns/instance names of the old 35 machine with those of the new machine in the relevant config files and also 36 in the db, if this step is not performed peergrouper will kick our machine 37 out of the vote list and fill it with the old dead ones. 38 * Restarts all services. 39 40 HA 41 -- 42 HA is a work in progress, for the moment we have a basic support which is an 43 extension of the regular backup functionality. 44 Read carefully before attempting backup/restore on an HA environment. 45 46 In the case of HA, the backup process will backup files/db for machine 0, 47 support for "any working state server" is plans for the near future. 48 We assume, for now, that if you are running restore is because you have 49 lost all state-server machines. Out of this restore you will get one 50 functioning state-server that you can use to start you other state machines. 51 BEWARE, only run restore in the case where you no longer have working 52 State Servers since otherwise this will take them offline and possibly 53 cripple your environment