[schnapps] Use a regular, non time based snapshot
This commit is contained in:
parent
1fa8b08c3b
commit
c2d05c145d
1 changed files with 5 additions and 1 deletions
|
@ -6,7 +6,7 @@ HOST="maru"
|
||||||
|
|
||||||
create_snapshot () {
|
create_snapshot () {
|
||||||
logger -p user.info -t schnapps_backup "Creating schnapps backup for host ${HOST}"
|
logger -p user.info -t schnapps_backup "Creating schnapps backup for host ${HOST}"
|
||||||
/usr/bin/schnapps create -t time 'Pre-export snapshot'
|
/usr/bin/schnapps create -t single "Export snapshot - ${CURRENT_DATE}"
|
||||||
sleep 1 # To make sure the lock is removed
|
sleep 1 # To make sure the lock is removed
|
||||||
snapshot_id=$(/usr/bin/schnapps list -j | /usr/bin/jq '.["snapshots"][-1].number')
|
snapshot_id=$(/usr/bin/schnapps list -j | /usr/bin/jq '.["snapshots"][-1].number')
|
||||||
if /usr/bin/schnapps upload "${snapshot_id}" > /dev/null;
|
if /usr/bin/schnapps upload "${snapshot_id}" > /dev/null;
|
||||||
|
@ -34,6 +34,10 @@ Hello,
|
||||||
|
|
||||||
the schnapps backup has been created successfully on date ${DATE_PRETTY}.
|
the schnapps backup has been created successfully on date ${DATE_PRETTY}.
|
||||||
|
|
||||||
|
Currently-available snapshots:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Note that snapshots older than 30 days are automatically deleted.
|
Note that snapshots older than 30 days are automatically deleted.
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
Loading…
Add table
Reference in a new issue