rebuild of backup command
This commit is contained in:
parent
b0233944c2
commit
20284fa8bb
4 changed files with 7 additions and 1 deletions
8
backup.sh
Normal file → Executable file
8
backup.sh
Normal file → Executable file
|
@ -1,7 +1,13 @@
|
|||
#!/bin/bash
|
||||
source env.sh
|
||||
echo "Backup $NAME at $DATE"
|
||||
BACKUP_CMD=restic backup $BACKUP_DIR $BACKUP_PARAMS -e $BACKUP_EXCLUSIONS
|
||||
BACKUP_CMD=restic backup $BACKUP_DIR
|
||||
if [[ $BACKUP_PARAMS ]]; then
|
||||
BACKUP_CMD=$BACKUP_CMD $BACKUP_PARAMS
|
||||
fi
|
||||
if [[ $BACKUP_EXCLUDE_FILE ]]; then
|
||||
BACKUP_CMD=$BACKUP_CMD --exclude-file $BACKUP_EXCLUDE_FILE
|
||||
fi
|
||||
running=$(pgrep -f "$BACKUP_CMD")
|
||||
if [[ $running ]]; then
|
||||
echo "Backup alreadying running : $running. Exiting..."
|
||||
|
|
0
env.sample.sh
Normal file → Executable file
0
env.sample.sh
Normal file → Executable file
0
init.sh
Normal file → Executable file
0
init.sh
Normal file → Executable file
0
snapshots.sh
Normal file → Executable file
0
snapshots.sh
Normal file → Executable file
Loading…
Reference in a new issue