futtern/deploy/local-deploy.sh
lubiana c5e0d47e03
All checks were successful
/ ls (pull_request) Successful in 32s
/ ls (push) Successful in 32s
/ ls (release) Successful in 23s
update backup part
2024-06-30 10:53:10 +02:00

10 lines
No EOL
480 B
Bash
Executable file

#!/usr/bin/env sh
export HOMEDIR='/home/c3h-futtern/'
. ./deploy/prepare-deploy.sh
ssh leitstelle-futtern 'systemctl --user stop pod-futtern'
ssh leitstelle-futtern "cp ${HOMEDIR}/futtern/app/var/data.db ${HOMEDIR}/backup/data.db-$(date +\"%Y%m%d%H%M%S\")"
ssh leitstelle-futtern "find ${HOMEDIR}/backup/ -type f | sort | head -n -10 | xargs rm -f"
rsync -avz --delete deploy/ leitstelle-futtern:futtern --exclude=var
ssh leitstelle-futtern '/home/c3h-futtern/futtern/update.sh'