Linux and open source articles and tutorials based on real world projects and deployments

Backup WordPress website with Python script

This is very simple script to backup wordpress based website. It could be used to backup any LAMP based site as well. There are many ways to backup wordpress site. This particular python script is very simple. It cosists of few variables

and 3 functions which will compress and tar webroot as well as do sql dump. If condition also exists to make sure at least 1G of space left on your backup drive.
Script below should be used as cron job. How to use crantab