Commit b601ec9b authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

feat(ci): backup the whole web directory without dereferencing symlinks;...

feat(ci): backup the whole web directory without dereferencing symlinks; remove all but 3 most recent backups
parent 7235f007
Pipeline #19838 passed with stages
in 2 minutes and 53 seconds
......@@ -57,4 +57,5 @@ Create the backup:
- echo "$KNOWNHOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh -p $SSHPORT $SSHCONNECT "mkdir -p ~/web/latest ~/backups/; cd ~/web/; tar -zchvf ~/backups/backup_$(date +'%Y_%m_%d').tar.gz latest"
- ssh -p $SSHPORT $SSHCONNECT "mkdir -p ~/web ~/backups/; cd; tar -zcvf ~/backups/backup_$(date +'%Y_%m_%d').tar.gz web"
- ssh -p $SSHPORT $SSHCONNECT "cd ~/backups/; ls -tr | head -n -3 | xargs --no-run-if-empty rm "
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment