Web Hosting & VPS Tips

Unleash Your Server Potential with Expert Insights

Hosting provided by: Cloudways
Free to Try! Up to 40% Off!

Category: Bash

Automate backups with Bash on Ubuntu—create backup sh with #!/bin/bash\ntar -czf /backup/site-$(date +%F) tar gz /var/www make executable with chmod +x backup sh and add to cron with crontab -e: 0 2 * * * /path/to/backup sh Test with /backup sh—expect a tarball Secures site data on DigitalOcean

Back to All Tips