diff options
author | Philippe Mazet <philippe.mazet@nxp.com> | 2019-11-21 16:01:05 +0100 |
---|---|---|
committer | Philippe Mazet <philippe.mazet@nxp.com> | 2019-12-09 21:18:54 +0100 |
commit | cccd52d88687294131116f2d1104e001cb58210d (patch) | |
tree | 3facb3995a1df7c0ed0ed2a524515e257a6f5916 /backup.sh | |
parent | 231f89625b0528732348dfc2cd10e3efad1ea14b (diff) |
backup.sh: remove docker interactive switch (does not work through crontab)
Diffstat (limited to 'backup.sh')
-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 -ti $DOCKERID tar czf /root/devices.tar.gz /etc/lava-server/dispatcher-config/devices/ || exit $? +docker exec -t $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 -ti $DOCKERID sudo -u postgres pg_dump --create --clean lavaserver --file /tmp/db_lavaserver || exit $? -docker exec -ti $DOCKERID gzip /tmp/db_lavaserver || exit $? +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 cp $DOCKERID:/tmp/db_lavaserver.gz $BACKUP_DIR/ || exit $? -docker exec -ti $DOCKERID rm /tmp/db_lavaserver.gz || exit $? +docker exec -t $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 -ti $DOCKERID tar czf /root/joboutput.tar.gz /var/lib/lava-server/default/media/job-output/ || echo "WARNING: tar operation returned $?" +docker exec -t $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 -ti $DOCKERID rm /root/joboutput.tar.gz || exit $? +docker exec -t $DOCKERID rm /root/joboutput.tar.gz || exit $? echo "Backup done in $BACKUP_DIR" rm -f backup-latest |