Linux Backups For Real People, Part 2
Last week we got our backup hardware in order, so today we're going into detail on backing up our data to a locally-attached backup device. We'll learn how to configure which files to backup, and create an easy one-word-command backup.
I like to divide backups into two categories: system and data. This little series is about data backups; check out MondoRescue for easy system cloning and disaster recovery.
We're not going to use any fancy, complicated specialized backup applications, but plain old reliable efficient
rsync transfers only changes, so after your first run subsequent backups are very fast. It creates ordinary Linux directory and file structures, so restoring files is done via your usual favorite file copying method, rather than needing special backup software and weirdo commands.
Your backup drive should be a minimum of two times larger than the total of the files you want to backup. Graphical file managers will tell you how large your directories are, though I like the good old
du (disk used) and
df (disk free) commands because they're fast, and they work the same way on all Linuxes. Just fire up a terminal and run this command to see the used and free space on your local filesystems:
$ df -hlx tmpfs Filesystem Size Used Avail Use% Mounted on /dev/hda1 14G 2.4G 11G 18% / /dev/sda1 31G 9.3G 21G 32% /home /dev/hda2 4.5G 543M 3.8G 13% /var
du for individual files and directories, as this example for my
finances directory shows:
$ du -hs finances 8.2M finances
Leave off the
-s to see the files in the directory displayed, and their sizes.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Knoppix 7.3, Slacko Puppy 5.7 and PC-BSD 10.0.1