underground-software / singularity

KDLP: Beyond the event horizon
https://kdlp.underground.software
GNU General Public License v3.0
0 stars 0 forks source link

backup and restore scripts #83

Closed theyoyojo closed 2 months ago

theyoyojo commented 2 months ago

The backup script gzips the volumes exported from podman and outputs them to stdout. The restore script takes an archive of this same format from stdin and imports the volumes into podman after deleting them and re-creating them afresh.

Sample usage:

$ ./backup.sh > archive.tar.gz $ ./restore.sh < archive.tar.gz # containers must be down

Fixes #62

charliemirabile commented 2 months ago

depends on #54

theyoyojo commented 2 months ago
./test.sh
+ trap : EXIT
+ DOCKER=podman
+ require curl
+ command -v curl
+ require jq
+ command -v jq
+ require flake8
+ command -v flake8
+ require podman
+ command -v podman
+ ./script-lint.sh
+ shellcheck script-lint.sh
+ shellcheck test.sh
+ shellcheck orbit/test-style.sh
+ shellcheck orbit/warpdrive.sh
+ shellcheck -x backup/backup.sh

In backup/backup.sh line 6:
. ./volumes_list
  ^------------^ SC1091 (info): Not following: ./volumes_list: openBinaryFile: does not exist (No such file or directory)

For more information:
  https://www.shellcheck.net/wiki/SC1091 -- Not following: ./volumes_list: op...
+ :

it's true, the scripts don't work when invoked outside of their directories