LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Rsnapshot and Backup Strategy (https://www.linuxquestions.org/questions/slackware-14/rsnapshot-and-backup-strategy-638415/)

Woodsman 04-28-2008 11:31 AM

Rsnapshot and Backup Strategy
 
I'm running Slackware 12.0 (soon to be 12.1 :)). I am planning my backup strategy for my new box. This is a single box, for home and business use. I am not using additional boxes as a backup server and am not interested in that option.

I have two internal hard drives: a 40GB IDE primary and a 320GB SATA secondary. I also have a 750GB SATA for full backups.

I configured my 320GB drive with a partition for archiving and quick backups. I use that partition for temporary backups, including snapshots of significant configuration files. The idea is to have immediate restoration access for when I inadvertently or incorrectly modify such files. Because the temporary backups are stored on my secondary drive, other than a complete hardware disaster I would be able to quickly restore files to my primary drive.

I would like those interim and temporary backups to be automatic and to run daily and hourly.

I want my 720GB drive to serve as my "off-site" backup device. I have a SATA mobile tray installed. The idea is to insert the 720GB drive, manually perform a full backup and then safely store the drive. I want weekly and monthly full backups. By full I mean everything in my root tree except obvious temp and cache files.

Rsnapshot seems ideal for this task. With rsnapshot and hard links I should be able to backup for several months on my 750GB drive. I am experimenting with rsnapshot but have additional questions.

The hourly and daily backups of configuration files seems straightforward with cron. Just follow the rsnapshot user manual. However, I'm unsure how to best configure rsnapshot for my manual weekly and monthly backups.

Do I need two different rsnapshot.conf files to support two different backups schemes? The primary conf file for my automated backups and a second conf file for my manual backups?

I need to manually mount the 720GB drive to a known mount point before I can manually run rsnapshot. Additionally, is there a way to automate whether my manual backup is a weekly or a monthly or do I need to do that manually too (with the commands: rsnapshot weekly, rsnapshot monthly)? Would a script be a better solution for the weekly and monthly backups?

Can I configure udev such that my 720GB drive is always recognized as the same device (sdb)? I might have mounted a USB stick mounted during a session before I perform a weekly or monthly backup. Writing a script to auto-mount would be a challenge if I don't know whether my drive is sdb, sdc, sdd, etc. I would like to force USB sticks to mount anywhere after sdb and reserve sdb for my 720GB drive.

I welcome any ideas or suggestions regarding rsnapshot.

As always, thank you.

Chuck56 04-28-2008 09:55 PM

Rsnapshot is an awesome script! I've been using it to back up 4 servers (2 physical and 2 virtual) and 1 desktop for nearly 2 years now. Each server has a single config file that addresses the daily/weekly/monthly backups. The desktop is just a manual rsnapshot when I remember.

I use 3 cron jobs (daily/weekly/monthly) for each server. Other than the initial backup these backups range from less than 2 minutes to maybe 7 minutes. I've used these backups to recover data files and its saved me countless times from my mistakes. I only backup the following directories on the daily/weekly/monthly cycle:

/boot
/etc
/opt
/root
/var
/home

Some other directories may change if I install updates or new applications so I run a quarterly manual snapshot on them. I've never had to use the quarterly backups on these directories:

/bin
/lib
/sbin
/srv
/usr

The remaining directories I just don't worry about. If I need something in those directories I'm probably better off starting over with a fresh install.

/dev
/media
/mnt
/proc
/tmp

Hope that helps!

Woodsman 04-28-2008 10:48 PM

Quote:

Hope that helps!
Every little tidbit helps! Thank you. I'll chew on this for the next few days.

For the past few days I have been manually running rsnapshot hourly to gradually understand what to backup and how each backup differs from the previous. All but the first backup is fast, for sure.


All times are GMT -5. The time now is 02:34 PM.