Your here because you want a killer backup solution. RAID1 is the ticket. Once you have RAID setup you can add additional drives in a matter of several commands. USB is quick and simple, so start by pluggin in your USB hard drive. Open your gparted, disk configuration, or otherwise determine the label of your drive. For instance my USB hard drive is /dev/sdb1. Format the drive with Linux RAID autodetect:
fdisk /dev/sdb1
Use the “n” option to format the partitions. Select primary partitions and configure the size according to your needs. Then use the “t” option. T refers to type; select RAID Linux Autodetect with “fd”.
Write the changes to the disk with the “w” option.
Now your disk will work with an active RAID system. Add the new drive to a RAID MD partition:
mdadm --add /dev/md0 /dev/sdb1
Then grow the array to autosync the drive:
mdadm --grow /dev/md0 --raid-devices=3
Your USB drive will now be synchronized with the MD0 RAID partition. If the MD0 partition contains the boot and root directory you can install GRUB to make the USB hard drive completely bootable. As posted previously I recommend the Super Grub Disk to install GRUB on your RAID disks. Give a quick google search for Super GRUB disk, or you can search this blog.
Share, Enjoy, and Support:
I currently use a USB Maxtor “One Touch” as a system backup device. Given my current server configuration the Maxtor Drive only contains the single .VDI file representing the VirtualBox server environment. While it is important to keep this file backed up, it is even more important to minimize the use of the backup drive. Optimally you should only plugin your backup drive only right before you are about to perform a backup. Immediately after the backup is complete you should unplug the hard drive. Doing so will effectively maximize the life span, and integrity of your drive and associated backup files.
To compensate you can backup your databases in between USB hard drive backups (this assumes that you are using a blog software as a database backend). This will obviously not backup your files, but in the case data loss, having the databases is substantially better than having nothing at all. The database backend typically stored all the text, and configurations that you input into your blog (ie. Wordpress, Typosphere). The server files can be downloaded, and installed again; then the databases simply re-uploaded, but without the databases the files are useless.
ALWAYS BACKUP!
Share, Enjoy, and Support:
RAID is really tempting, especially the hot swapping feature of hardware RAID. The obvious deterrent is the high costs of a quality raid controller. The economical alternative is Linux software RAID. This is easily implementable with reference to a variety of easily available online tutorials. Considering the ease of implementation RAID is a viable option. I do not use RAID primarily because I don’t have multiple hard drives nor the capital requirements to purchase them. Sometimes you have to work with what you got. I have a simple backup solution, and since this server environment is Virtual, my entire backup involves the copying of a single .VDI file to a USB hard drive. For redundancy I also transfer via ssh the server .VDI file to my laptop, and the host system. The fourth backup goes to my mail server. Essentially I have a relatively fault resistant server environment. Worst case scenario is the host environment will have to be formatted with a clean OS, and then the virtual server copied form the USB backup. After a quick install of VirtualBox the server environment would be back up in no time. Overall this process would probably take about 35 minutes.
Share, Enjoy, and Support:
When you create a guest operating system it is stored in a VirtualBox .vdi file. This .vdi is the hard drive that you created during the setup of your guest OS. Your .vdi images are stored in /home/user/.virtualbox/vdi.
To backup your VirtualBox guest operating systems simply copy the specific .vdi file to a usb hard drive, another partition, or a separate internal hard drive. I typically use SSH or FTP to transfer the .vdi image of my server to my laptop
To restore your VirtualBox guest operating system simply copy the specific VDI file from your usb hard drive, another partition, or your separate internal hard drive to /home/user/.virtualbox/vdi. Then in VBoxManage you can create a new guest operating system and use the imported VDI as the hard drive.
I also happen to offer a variety of .vdi images of your favorite Linux distributions. See VirtLinux.com for more information
Share, Enjoy, and Support:
The Ubuntu repositories comes equipped with BackupPC and all required dependencies. To install BackupPC type:
sudo apt-get install backuppc
You will be accessing BackupPC via your web browser. To access BackupPC type in a web browser:
http://localhost/backuppc
Its a rather powerful system, and I personally find it interesting that its designed to be operated via a web browser, although the software resides on your local system. It is indeed a crafty use for Apache web server and the php programming language.
Share, Enjoy, and Support:
With a Virtual Server your hardware is backed up completely within the VDI image. Your Mysql databases, specifically for websites that are blogs update often; more often than you would like to backup your 50 Gigabyte VDI image. To compensate, and significantly ease backup procedures have your mysql databases backed up regularly. Daily, hourly, or even after each post is recommended in order to effectively secure needed files in case a system restore is required. To backup your mysql databases you can view my previous post:
http://www.bgevolution.com/blog/index.php/cron-server-backup-scripts/
Share, Enjoy, and Support:
When a virtual server is utilizing the host systems network, and receives an independent local IP via DHCP from your router it appears to be an actual computer form the outside world. If a backup of the VDI is kept regularly it can simply replace a damaged, or hacked system in the time it takes to copy a file. Virtual servers exist as a single VDI file, therefore for blogs that utilize database backends simply copy your backup server VDI image, boot, then use your phpmyadmin to update your mysql databases from your backups; obviously this entails keeping mysql database backups. For more information about mysql backups utilizing automated cron scripts see:
http://www.bgevolution.com/blog/index.php/cron-server-backup-scripts/
Share, Enjoy, and Support: