diff --git a/Dockerfile b/Dockerfile index 0815c68..030b3dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:latest RUN apk update && \ - apk add --no-cache openssh-client nfs-utils zstd + apk add --no-cache openssh-client zstd tar # RUN mkdir -p /mnt/nfs diff --git a/copy_files.sh b/copy_files.sh index a8eb01e..8227df3 100644 --- a/copy_files.sh +++ b/copy_files.sh @@ -8,6 +8,20 @@ FTP_PATH=$FTP_PATH # mount -t nfs $NFS_SERVER:$NFS_PATH /mnt/nfs +echo "Start copying via FTP $FTP_PATH" sftp -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no $FTP_USER@$FTP_SERVER:$FTP_PATH /mnt/beacon_data +cd /mnt/beacon_data -umount /mnt/beacon_data +echo "Unpacking the data" +tar -I zstd -xvf *.tar.zst + +echo "Deleting the tar.zst" +rm *.tar.zst + + +if [ -n "$DEBUG" ]; then + echo "In debug mode, you need to kill manually the container" + tail -f /dev/null +fi + +# umount /mnt/beacon_data