From 231f89625b0528732348dfc2cd10e3efad1ea14b Mon Sep 17 00:00:00 2001 From: Philippe Mazet Date: Fri, 6 Dec 2019 17:41:23 +0100 Subject: Allow using different folder than /tmp for tar operations When backup size grows to several GB, tar operation can fail with "no space left on device" error. This is because of the limited size of /tmp on certain machines This changes allows using a different folder. This can be done by simply adding such line in Dockerfile: ENV TMPDIR /wherever/tmp --- lava-master/entrypoint.d/01_setup.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lava-master/entrypoint.d') diff --git a/lava-master/entrypoint.d/01_setup.sh b/lava-master/entrypoint.d/01_setup.sh index 4755bc4..ba81f77 100755 --- a/lava-master/entrypoint.d/01_setup.sh +++ b/lava-master/entrypoint.d/01_setup.sh @@ -17,6 +17,10 @@ if [ -e /root/backup/db_lavaserver ];then yes yes | lava-server manage migrate || exit $? echo "Restore jobs output from backup" rm -r /var/lib/lava-server/default/media/job-output/* + + # allow using different folder for tar operations (/tmp by default) + TMPDIR=${TMPDIR:-/tmp} + tar xzf /root/backup/joboutput.tar.gz || exit $? fi -- cgit 1.2.3-korg