Add some snapshot logic there.
This commit is contained in:
parent
c457118aec
commit
ea7bd1d42c
@ -122,15 +122,16 @@ echo "BACKUP_WWW_APPS: $BACKUP_WWW_APPS"
|
|||||||
|
|
||||||
# let's grab a snapshot of the
|
# let's grab a snapshot of the
|
||||||
if [ "$BACKUP_WWW_APPS" = true ]; then
|
if [ "$BACKUP_WWW_APPS" = true ]; then
|
||||||
#SNAPSHOT_ID=$(cat /dev/urandom | tr -dc 'a-aA-Z' | fold -w 6 | head -n 1)
|
SNAPSHOT_ID=$(cat /dev/urandom | tr -dc 'a-aA-Z' | fold -w 6 | head -n 1)
|
||||||
#incus storage volume snapshot create ss-base www-ss-data "$SNAPSHOT_ID"
|
incus storage volume snapshot create ss-base www-ss-data "$SNAPSHOT_ID"
|
||||||
BACKUP_LOCATION="$HOME/ss/backups"
|
BACKUP_LOCATION="$HOME/ss/backups"
|
||||||
mkdir -p "$BACKUP_LOCATION"
|
mkdir -p "$BACKUP_LOCATION"
|
||||||
incus storage volume export ss-base "www-ss-data" "$BACKUP_LOCATION/project-$(incus project list --format csv | grep "(current)" | awk '{print $1}')_www-ss-data_""$(date +%s)"".tar.gz"
|
#incus storage volume export ss-base "www-ss-data" "$BACKUP_LOCATION/project-$(incus project list --format csv | grep "(current)" | awk '{print $1}')_www-ss-data_""$(date +%s)"".tar.gz"
|
||||||
#incus storage volume snapshot delete ss-base "www-ss-data" "$SNAPSHOT_ID"
|
#incus storage volume snapshot delete ss-base "www-ss-data" "$SNAPSHOT_ID"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$SERVERS" == *"www"* && "$SERVERS" == *"btcpay"* ]]; then
|
||||||
if incus network list -q | grep -q ss-ovn; then
|
if incus network list -q | grep -q ss-ovn; then
|
||||||
incus network delete ss-ovn
|
incus network delete ss-ovn
|
||||||
|
fi
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user