database

Using rsnapshot for File and Database Backups

rsnapshot is my favorite tool for doing automated distributed backups on Linux machines. It saves you a lot of headaches - and it finally replaced all those hundreds of hand-made backup scripts I previously used.

rsnapshot itself is easy to use. But setting up the infrastructure for it - namely password-less ssh logins and database dumps - always requires some work. Here's how I do it.

Production Database Download - The Easy Way

How often did you download your production database to your development machine? And how often did you write a script for that?

You're first dumping your MySQL production database - easy. Then you download it with scp or ftp or ... to your local development machine and then you overwrite your existing database with that dump - easy. But: those are three steps. Often you do it manually, "because I don't need it that often"... Don't you?

Round Robin Database with MySQL

If you have loads of continuous data which you have to store and at the same time it is o.k. if old data gets removed after a while, a round robin database is your choice. Those databases allow the user to define a maximum number of records (or maximum number of storage space) and new data that would not fit into the allocated space, will simply overwrite the oldest record in the database. Basically a ring buffer on disk. The database won't grow indefinitely and you don't have to do extensive maintenance tasks.

Syndicate content