Skip to content

Commit

Permalink
Restore job output on the right place
Browse files Browse the repository at this point in the history
Job output was restored on the wrong place.
So we need to move them on the right directory

Same problem for devices files

Signed-off-by: Corentin LABBE <[email protected]>
  • Loading branch information
montjoie committed May 5, 2023
1 parent 743a5e8 commit cac7cdd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lava-master/entrypoint.d/01_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ if [ ! -e "/var/lib/postgresql/lava-docker.backup_done" ];then
# allow using different folder for tar operations (/tmp by default)
TMPDIR=${TMPDIR:-/tmp}

echo "DEBUG: restoring jobs output"
tar xzf /root/backup/joboutput.tar.gz || exit $?
mv /root/var/lib/lava-server/default/media/job-output/* cd /var/lib/lava-server/default/media/job-output/
chown -R lavaserver:lavaserver /var/lib/lava-server/default/media/job-output/
touch /var/lib/postgresql/lava-docker.backup_done
fi
if [ -e /root/backup/devices.tar.gz ];then
echo "INFO: Restoring devices files"
tar xzf /root/backup/devices.tar.gz
mv /root/etc/lava-server/dispatcher-config/devices/* /etc/lava-server/dispatcher-config/devices/
chown -R lavaserver:lavaserver /etc/lava-server/dispatcher-config/devices
fi
else
Expand Down

0 comments on commit cac7cdd

Please sign in to comment.