To restore and export a backup from the ComputeStacks backup agent, you will need administrator access to one of the nodes that has access to that particular backup.
SECTIONS
Login via ssh and gain root access.
Create an export directory, for example /root/backup-export
.
cd /root && mkdir backup-export
Aquire the backup encryption key. This can be found in /etc/computestacks/agent.yml
under backups.key
.
<aside>
⚠️ If your key has a $
character in it, be sure to escape that before adding it to the container (\\$
).
</aside>
Determine the backup volume name.
b-<the-volume-UUID>
.Create the backup container.
docker run -it --rm -l com.computestacks.role=backup \\
-e BORG_PASSPHRASE="BACKUP-KEY" \\
-e BORG_BASE_DIR=/mnt/borg \\
-v b-{{ volume-UUID }}:/mnt/borg \\
-v /root/backup-export:/mnt/export \\
cmptstks/borg:stable ash
This will launch the container and place you into an interactive shell.
List all available backups
borg list /mnt/borg/backup
<aside> 👉 https://borgbackup.readthedocs.io/en/stable/usage/list.html
</aside>
(Optional) List files in the backup
# example: borg list /mnt/borg/backup::test-m-2022-10-12T22:34:43
borg list /mnt/borg/backup::{{ archive name outputted in previous command }}
Extract backup into directory
# example: cd /mnt/export && borg extract /mnt/borg/backup::test-m-2022-10-12T22:34:43
cd /mnt/export && borg extract /mnt/borg/backup::{{ archive name outputted in previous command }}
<aside> 👉 https://borgbackup.readthedocs.io/en/stable/usage/extract.html
</aside>
You may now exit the container:
exit
The container will be automatically stopped & deleted upon exit.
Your files will now be in the directory you initially setup (e.g. /root/backup-export
). You can now compress that entire directory and transfer it wherever it needs to go.