|
techAdmin
Back to top
Status: Site Admin Joined: 26 Sep 2003 Posts: 850 Location: East Coast, West Coast? I know it's one of them. |
Script name: rd-h2.sh
This script automates the process of creating an rdiff-backup. Download the complete bzipped file The script has many features, and the download includes many features and should be all that you need to get going. Script changes
Pre 1.4.2 users: please update script: Edit in rd-h2.sh first line, change: #!/bin/sh to #!/bin/bash This avoids other shells breaking it if they are default /bin/sh, like dash for example. Format backup drive or partition correctly Make sure to use a file system that supports advanced unix file ownership and permissions. FAT and FAT32 do not do this, so you will lose your system permissions on restore. Do not use FAT type file systems for your backup partition. Either ext2 or ext3 are good options. Download and unzip script To get the script, download it to your preferred location. I like using /home/username/bin, so let's say that's where you download it. Simply execute the following commands in shell, as regular user: :: Code :: cd ~/bin
wget techpatterns.com/bu tar xjvf bu.tar.bz2 You will need to do some editing of the USER VARIABLES section to have the script work on your machine. Inside the bu directory that is created when you unzip the package, there will be the following files: :: Code ::
bu # directory for following files: rd-h2.sh # main program file root-excludes.txt # root excludes list, should not need to be changed home-excludes # blank, add paths for exclusion if required, do not delete readme-rd-h2.txt # instructions on how to setup the script If you ask me how to do something that is explained in the readme file, I won't offer you any help. So read it before asking, that's why it's there! Script set up: read the included readme-rd-h2.txt PLEASE I won't repeat what's in the readme file, just remember that you must setup your USER VARIABLES before running the script, this will assign correct directory names and backup locations. Script options You can start the script using one or none of these three options:
To start the script, let's say it's in /home/fred/scripts, and you want to use the -b option, you'd type in the following: :: Code :: cd /home/fred/scripts
./rd-h2.sh -b # or you can just type the whole path: /home/fred/scripts/rd-h2.sh -b Script features The script will create by default two primary backup directories, bu-1 and bu-2. Each directory will be used in alternating 3 month periods of time. This means that you will have two completely separate backup, and these will be assigned automatically based on the current month of the year. The defaults are: months 1-3: bu-2 months 4-6: bu-1 months 7-9: bu-2 months 10-12: bu-1 The script does the following steps each time you run it, unless you use the -b or -d options, which will skip the questions.
And that's about it. For more information on restoring, read: man rdiff-backup Things to be aware of with rdiff-backup
Exlude file information
Read more in-depth about how rdiff-backup handles include and exclude statements in: man rdiff-backup |
|||||
|
All times are GMT - 8 Hours
|
||||||
Contact Us
Hosting: Pair Networks: 0.065
Forum Software © 2001–2006 phpBB
techForum Style © 2003–2006 techpatterns.com
info
Hosting: Pair Networks: 0.065
Forum Software © 2001–2006 phpBB
techForum Style © 2003–2006 techpatterns.com
info