Linux Backups For Real People, Part 3
Simple Network Backups
In part 1 of this series we learned how to format USB storage devices for maximum portability, and how to configure udev so they would always have the same names when you plug them in, and in part 2 we learned a simple, efficient way to use the excellent rsync command for easy single-user backups.
Today we're going to create menu icons for launching our backups whenever we darned well feel like it, set up a simple network backup scheme, and create automatic scheduled backups.
First we'll take our rsync incantation from last week and enshrine it in a shell script, and give it an imaginative name like, oh, what about backupscript:
#!/bin/sh ################################## # simple rsync script for making backups # to a USB storage device, formatted in # FAT16/32 ################################## # this must be one long unbroken line rsync -rlvt --modify-window=1 --include-from=/home/carla/rsync-includes \
/home/carla/* /media/BACKUP1
If you are having trouble using include and exclude files, there is a simpler way: just list all the files and directories you want to backup like this:
rsync -rlvt --modify-window=1 \ /home/carla/thisdirectory \ /home/carla/thatdirectory \ /home/carla/filename \ /media/BACKUP1
You don't have to list them one per line; that's just how I like to do it. The backslashes tell Bash that you are spreading the command out over several lines. If you put it all on one line, be sure it's one long unbroken line.
Make your script executable:
$ chmod +x backupscript
- Skip Ahead
- 1. Simple Network Backups
- 2. Simple Network Backups
- 3. Simple Network Backups
- 4. Simple Network Backups
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.