Tuning Apache & CentOS 7 for Backups

112 views Asked by At

My Setup Uncompressed my webserver files take up about 4GB of space and the used MySQL database is about 4GB as well. MySQL is running on a remote Amazon RDS instance and the webserver is on an EC2 in the same region.

The steps of my backup are this...

  1. Compress public_html => public_html.gz
  2. Dump Remote DB
  3. Compress DB to db.gz
  4. Compress public_html.gz, db.gz => backup.gz
  5. Uploaded backup.gz to Amazon S3 bucket

The server runs on 3.5 GB RAM with two cores.

My problem During the backup my website becomes unbearably slow. However, CPU usage peaks at 5% and RAM peaks at 1 GB when at least 2 GB is free to consume. This leads me to believe that the database could be at fault for the slow performance but I have very little experience with MySQL configuration and, if it is to blame, am not sure what needs to be done to speed up the backup.

1

There are 1 answers

0
George Rushby On

If you are using Amazon RDS why are you running a manual backups?

Please go read the RDS documentation and enable Automated Backups.

Working With Automated Backups:

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html

Once you have removed that from you backup 'script' check you performance.

I suggest you try one of the following for backing up your website:

  1. If you website doesn't have any user generated content then use GIT.
  2. If you website does have user generated content then look at AWS snapshots.