You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
James Harmison fe6294830c
Stop using overloaded add
2 weeks ago
env Correct quoting in vars and add some notes 2 weeks ago
overlay/usr/local/bin Tried to force export 2 weeks ago
podman Correct auto-update behavior 2 weeks ago
template Correctly sanitize .drone.yml on new repo 2 weeks ago
.drone.yml Correct handling of secrets w/ permissions 2 weeks ago
.gitignore Added some extra gitignores for env 2 weeks ago
Containerfile Stop using overloaded add 2 weeks ago
LICENSE Updated LICENSE 2 weeks ago
README.md Corrected env link 2 weeks ago

README.md

Template

Build Status

Builds from main are pushed to Harbor

Configuration

Please see the documentation on the environment files provided in the env subdirectory.

Use

Please see the podman README for information on how to use podman to run Template.

Backup and Restore

Use a variation of the following to make backups:

mybackup_dir=~/backups # Or some mounted folder you'd like to do backups to
mkdir -p "$mybackup_dir"
for volume in template-data template-db; do
    podman run --rm -v $volume:/volume -v "$mybackup_dir":/backups alpine tar cvzf /backups/$volume-$(date +%Y-%m-%d).tgz -C /volume ./
done

In order to restore those backups, you would run something like:

mybackup_dir=~/backups # Or some mounted folder you'd like to restore backups from
backups=$(for backup in "$mybackup_dir"/template-data-*.tgz; do
    echo -n "$backup" | rev | cut -d. -f2 | rev | tail -c11
done) # This pulls the datestamps and sizes for existing backups if formatted like above
select backup in $backups; do [ "$backup" ] && break || echo "Unknown selection: $REPLY" >&2; done # this lets you pick from the existing backups
for volume in template-data template-db; do
    podman run --rm -v $volume:/volume -v "$mybackup_dir":/backups alpine sh -c "rm -rf /volume/* /volume/..?* /volume/.[!.]* ; tar xvzf /backups/$volume-$backup.tgz -C /volume"
done