Backup for small WP sites using dropbox and wp-cli and
Create new app call it anything it's gonna be your private app.
Generated access token and save it somewhere in your locker
Download file backup-site.sh and change
directories path and
sudo chmod +x backup-site.sh
Setup crontab with
crontab -e add following line there
0 5 * * * /root/backup-sites.sh > /dev/null 2>&1
This will backup site everyday at 5 am.
- This scripts assumes your installation will be under
example.com/htdocsif not it's time to fork this and modify script.
- This will backup your WP tables and wp-content folder.
- You can also change path of
- You should clean up your dropbox folder before you run out of memory.
- Modify crontab if you want to change backup interval to less frequent or more frequent.