Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I finished configuring my first production server, and I'm thinking about strategy to backup data.

In my head this task has 3 faces.

  1. Filesystem (ubuntu itself)
  2. Mysql
  3. webroot

Strategy 1. Every 6 month tarball Filesystem and save it to remote server in other location. 2. Every sunday create sql dump and save to remote server 3. No need to backup, webroot is on SVN remote server.

What do you think about this?

Now my question is, how do I scp tar/dump files to remote server in secure way? I will have to create little shell script that would make backup files automatically and move them to remote, but that will require putting ssh access directly in plain file.

share|improve this question
up vote 1 down vote accepted

If you are using LVM, make a snapshot of volumes you need with lvcreate -s, then dd or tar > gzip > rsync to remote location.

mysqldump > gzip > rsync is fine if your DB isn't under heavy load. Use cron for scheduling backups.

For secure transfer you don't need to have a password somewhere in plain text. Use rsync over ssh with rsa-key auth, that's it.

Please, at least try to do research yourself, before asking questions here. This is really trivial stuff.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.