diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2020-09-04 08:37:17 +0200 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2020-09-04 08:37:17 +0200 |
commit | b91a3d121f605da92af54de91d1b790c6df80598 (patch) | |
tree | b8736711773917573a5708504181495dfe4f99c0 | |
parent | 9b1a827ac2eecb9f251881f2092305baace99c45 (diff) |
backup.sh: do not allocate tty
For backuping we dont need a tty. Furthermore, this break AGL cron
backup.
-rwxr-xr-x | backup.sh | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -15,19 +15,19 @@ if [ -z "$DOCKERID" ];then exit 1 fi -docker exec -t $DOCKERID tar czf /root/devices.tar.gz /etc/lava-server/dispatcher-config/devices/ || exit $? +docker exec $DOCKERID tar czf /root/devices.tar.gz /etc/lava-server/dispatcher-config/devices/ || exit $? docker cp $DOCKERID:/root/devices.tar.gz $BACKUP_DIR/ || exit $? # for an unknown reason pg_dump > file doesnt work -docker exec -t $DOCKERID sudo -u postgres pg_dump --create --clean lavaserver --file /tmp/db_lavaserver || exit $? -docker exec -t $DOCKERID gzip /tmp/db_lavaserver || exit $? +docker exec $DOCKERID sudo -u postgres pg_dump --create --clean lavaserver --file /tmp/db_lavaserver || exit $? +docker exec $DOCKERID gzip /tmp/db_lavaserver || exit $? docker cp $DOCKERID:/tmp/db_lavaserver.gz $BACKUP_DIR/ || exit $? -docker exec -t $DOCKERID rm /tmp/db_lavaserver.gz || exit $? +docker exec $DOCKERID rm /tmp/db_lavaserver.gz || exit $? # tar outputs warnings when file changes on disk while creating tar file. So do not "exit on error" -docker exec -t $DOCKERID tar czf /root/joboutput.tar.gz /var/lib/lava-server/default/media/job-output/ || echo "WARNING: tar operation returned $?" +docker exec $DOCKERID tar czf /root/joboutput.tar.gz /var/lib/lava-server/default/media/job-output/ || echo "WARNING: tar operation returned $?" docker cp $DOCKERID:/root/joboutput.tar.gz $BACKUP_DIR/ || exit $? -docker exec -t $DOCKERID rm /root/joboutput.tar.gz || exit $? +docker exec $DOCKERID rm /root/joboutput.tar.gz || exit $? echo "Backup done in $BACKUP_DIR" rm -f backup-latest |