Backups

Tags:

Here's a simple and fairly cheap way of building a portable, external backup drive for Linux if you have existing internal hard drives lying around. The whole thing costs about $50 and an hour or two of your time. Let's begin.

Prerequisites

  1. Any old hard drive - I have a 40Gb hard drive from 2002 which I'll be referring. You can use any hard drive you want as long as it's supported by the external hard drive enclosure (see Venus DS3 below).
Tags:

Here's a simple command line example of a backup task for MySQL.

mysqldump <DB_NAME> -v -u <MYSQL_USERID> --password=<MYSQL_PASSWORD> > sql_file_name.sql

Let's break this down.

  • <DB_NAME> - The name of the database to dump.

  • -v - This outputs some dump information. You can add more than one of these (-vvv) for a very detailed dump information.

  • -u <MYSQL_USERID> - This is the userid of the database owner in MySQL.

Tags:

Here's a simple bash script I created for backing up items to a remote machine. It uses rsync. Rsync is a very powerful tool used primarily for backing up and synchronizing files/directories over the network. If you don't have rsync, you can obtain it here. Or, do one of the following.

For Debian based systems:

apt-get install rsync

For RedHat based systems:

yum install rsync

Syndicate content