Basic Install
/etc/sysbackup/
+-- conf.d/
| +-- dummy.conf -> /opt/sysbackup/conf.d/dummy.conf
| +-- homedirs.conf
| +-- mailman.conf -> /opt/sysbackup/conf.d/mailman.conf
| +-- mysql.conf -> /opt/sysbackup/conf.d/mysql.conf
| +-- package-list.conf -> /opt/sysbackup/conf.d/package-list.conf
| +-- squirrelmail.conf -> /opt/sysbackup/conf.d/squirrelmail.conf
| +-- sysdirs.conf -> /opt/sysbackup/conf.d/sysdirs.conf
| +-- sysmail.conf -> /opt/sysbackup/conf.d/sysmail.conf
| \-- syswebfiles.conf -> /opt/sysbackup/conf.d/syswebfiles.conf
+-- keys/
| +-- filecopy
| +-- filecopy.pub
| +-- localexec
| \-- localexec.pub
+-- plugin.d -> /opt/sysbackup/plugin.d/
\-- sysbackup.conf
/home/sysbackup/
+-- .ssh/
| +-- known_hosts
| +-- authorized_keys2
| +-- localexec.openssh
| +-- localexec.openssh.pub
| +-- filecopy.openssh
| +-- filecopy.openssh.pub
+-- test.azertech.net/
| +-- daily/
| +-- weekly/
| +-- monthly/
\-- temp/
/opt/sysbackup/
+-- app/
+-- conf.d/
+-- doc/
+-- lib/
+-- plugin.d/
| +-- dumpusers.plugin
| +-- homedirs.plugin
| +-- maildirs.plugin
| +-- mailman.plugin
| +-- mysql.plugin
| +-- packagelist.plugin
| \-- sysdirs.plugin
+-- dumpusers
+-- localexec
+-- remexec
+-- sysbackup
\-- sysbackup.conf
/var/log/
\-- sysbackup.log
|
This process is relatively simple. It consists of
unpacking the SysBackup package into a convenient location (we'll use
/opt/sysbackup/ for this example, then setting-up two folder
trees: one for configuration information and another for storage of
backups. For this example we'll be using /etc/sysbackup/ to
store the configuration files and /home/sysbackup/ to store
the backups. Please refer to the sample directory listings on the
right while reading the instructions below.
Once the setup is completed you will want to edit the
sysbackup.conf configuration file to reflect your
setup.
The last step in the process is to actually configure your backup
jobs. See the existing job configuration files in the
conf.d folder for detailed information about backup job
configuration. See also the JOB-CONF file more details.
Quick Install
In fact the following process is so simple that a script called
quick-install is available to do most of the work for
you. Simply unpack the distribution tarball in an appropriate location
(the examples here all use /opt/sysbackup/,) execute the
/opt/sysbackup/quick-install utility and follow the
instructions.
If you execute quick-install as root it will perform the
setup described in this Basic Installation document. If you execute
the script as a system user it will setup SysBackup to run in
/home/<user>/sysbackup.
Let's get started
- Start by unpacking the SysBackup tarball into an appropriate
folder. For this example we will use /opt/sysbackup/.
- Next you will want to setup your configuration folders and
files. For this example we will use
/etc/sysbackup/.
- Create a subfolder to hold any ssh key files that you might need in the future:
/etc/sysbackup/keys.
- Create a subfolder to hold the job configuration files:
/etc/sysbackup/conf.d.
- For now you can create a symlink from
/etc/sysbackup/plugin.d to the
/opt/sysbackup/plugin.d folder. This will ensure that
your installation will load all the distribution plugins. In the
future, when you update the distribution files in
/opt/sysbackup your installation will load the updated
plugins. Create this symlink in the usual way, ie: ln -s
/opt/sysbackup/plugin.d /etc/sysbackup/plugin.d.
- Create a folder for temporary storage. For this example we
will use /home/sysbackup/temp.
The underlying partition
will require enough disk space to hold the largest tarball in your
backupset. (Start with lots of disk space if possible. You can be
more careful later.)
- Create a storage folder for your daily backup rotation. By
default the backup folders have the format <Backup
Path>/<Host Name>/Rotation. Therefore, for this
installation we will use
/home/sysbackup/test.azertech.net/daily.
Again, there is
a disk space issue to consider when setting-up your backup
procedure but you can deal with that issue later.
One point to
consider immediately: The files in the temp folder will be moved
to the daily folder if you choose to keep a local copy of your
backupset. Keeping the two folders on the same partition can
reduce significantly the time it takes to complete a backup.
- If you plan to keep weekly and monthly rotations you will need
to create folders for those also. For now we will assume
/home/sysbacup/test.azertech.net/weekly/ and
/home/sysbackup/test.azertech.net/monthly.
Available disk
space is the main consideration yet again. Perhaps more important is the
ability to use hardlinks between identical files in the daily,
weekly and monthy rotations. You will use less disk space if you
can keep all the backups - daily, weekly and monthly - on the same
partition so that identical files can be hardlinked to save space.
- You can now copy the main configuration file and
start editing it: cp /opt/sysbackup/sysbackup.conf
/etc/sysbackup/. The file contains comments that will help
you to understand the various items that you need to configure.
- SysBackup will log a limited amount of information to
/var/log/sysbackup.log during each backup run. Create the log
file as follows so that SysBackup can write to it:
$ sudo touch /var/log/sysbackup.log
$ sudo chmod 666 /var/log/sysbackup.log
The chmod command above is only necessary if you plan on
running sysbackup without root permissions.
At the time of this writing there is no configuration option for
changing the location of the log file - you will have to edit the code
for now if you need to change the log file location.
This completes the software and folder setup. At this point the
SysBackup script will run but it will not do much for you. To get the
right results you need to configure the backup jobs that you want
SysBackup to execute for you.
Look through the sample job configuration files in
/opt/sysbackup/conf.d/ and symlink any that you
think you can use, ie: ln -s
/opt/sysbackup/conf.d/mailman.conf
/etc/sysbackup/conf.d/mailman.conf. If you find one that you
want to use but you see that you need to edit it you can copy it
instead: cp /opt/sysbackup/conf.d/homedirs.conf
/etc/sysbackup/conf.d/ and edit it for your purposes.
See the
JOB-CONF file for
information on the structure and meaning of these files.
|