Update backup test script
This commit is contained in:
parent
b923ff80b3
commit
f7e65c847c
1 changed files with 21 additions and 0 deletions
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
date_ts=$(date +%s)
|
||||
backupdir=/opt/backuptest
|
||||
static_file=$backupdir/file-static-1
|
||||
append_file=$backupdir/file-append-1
|
||||
checksums_file=$backupdir/checksums.sha256
|
||||
ts_file=$backupdir/file-ts-$date_ts
|
||||
|
||||
if ! [ -f $static_file ]; then
|
||||
echo "static" > $static_file
|
||||
fi
|
||||
|
||||
echo "$date_ts" >> $append_file
|
||||
|
||||
echo "$date_ts" > "$ts_file"
|
||||
|
||||
cd $backupdir
|
||||
sha256sum file-* > $checksums_file
|
Loading…
Add table
Reference in a new issue