How to back up `juju`
This document demonstrates how to back up
juju. A backup of the client enables one to regain management control of one’s controllers and associated cloud environments.
Making a copy of the client directory is sufficient for backing up the client. This is normally done with backup software that compresses the data into a single file (archive). On a Linux/Ubuntu system, the
tar program is a common choice:
cd ~ tar -cpzf juju-client-$(date "+%Y%m%d-%H%M%S").tar.gz .local/share/juju
For Microsoft Windows any native Windows backup tool will do.
The above invocation embeds a timestamp in the generated archive’s filename, which is useful for knowing when a backup was made. You may, of course, call it what you wish.
The archive should normally be transferred to another system (or at the very least to a different physical drive) for safe-keeping.
Whoever has access to a client backup will have access to its associated environments. Appropriate steps should be taken to protect it (e.g. encryption).
Restoring your client settings is a simple matter of extracting the backup created earlier. For Ubuntu:
cd ~ tar -xzf juju-yymmdd-hhmmss.tar.gz
This command will extract the contents of the archive and overwrite any existing files in the Juju directory. Make sure that this is what you want.
Last updated 5 months ago.