Skip to main content

(Linux) Auto Backups

Auto Backups

  • Will backup savefiles every 10 mintues with time stamp.
make this file in home dir

mkdir backup

chmod 777 backup

nano backup.sh

#!/bin/bash
rsync -avh "/home/pwserver/serverfiles/Pal/Saved/SaveGames/0/" "/home/pwserver/backup/$(date)/"

Add this line to crontab 

*/10 * * * * /home/pwserver/backup.sh > /dev/null 2>&1

https://crontab.guru/#*/10_*_*__ To change times

What crontab will look like with all crons