Blog Entries

Blog - Backups

Blog


Blog Index

Backups

Posted on 21st Nov 2016

DATA

For some companies running a website the site is the company - once it has gone the company cannot function.

I recently worked for a company in Laindon, Essex who were using a PHP + MySQL based system as their primary database for adding jobs , to my surprise it was not being backed up at all. I created a DROPBOX free account as the amount of data they were backing up was not too large - so the steps I went through were as follows:

1. create a FREE DROPBOX account and obtain the API and Secret key - these are different from the normal dropbox login as they allow a remote program to have access to the dropbox account.

2. I created a script - I no longer pocess the original script ... but it was something like this:

I used the dropbox uploader: https://github.com/andreafabrizi/Dropbox-Uploader

tar cvzf  files.tar.gz   var/www/html/

mysqldump -u root -ppassword  crm > crm.sql

tar cvzf  database.tar.gz   var/www/html/

dropbox_uploader.sh /var/www/html/ *.zip /

 

The script runs in a cron job every hour.

REMEMBER TO BACKUP when possible!!!