summaryrefslogtreecommitdiffstats
path: root/lava-master/entrypoint.d
diff options
context:
space:
mode:
authorPhilippe Mazet <philippe.mazet@nxp.com>2019-12-06 17:41:23 +0100
committerPhilippe Mazet <philippe.mazet@nxp.com>2019-12-06 18:04:32 +0100
commit231f89625b0528732348dfc2cd10e3efad1ea14b (patch)
treeaed9d88a19545fb0ab225c697cd94ea92202eb89 /lava-master/entrypoint.d
parent9783987dcc1b2b4935ea9c5d4ff7db443f0f7abe (diff)
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
Diffstat (limited to 'lava-master/entrypoint.d')
-rwxr-xr-xlava-master/entrypoint.d/01_setup.sh4
1 files changed, 4 insertions, 0 deletions
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