Changes

stoney backup: Server set-up

2,245 bytes added, 07:18, 31 August 2013
/* schedule warning */
==== Run-Level ====
rc-update add prov-backup-rsnapshot default
 
== Snapshots ==
We use rsnapshot - remote filesystem snapshot utility for the actual snapshots and a handful of wrapper scripts, that do things like:
* Read the users and their settings from the LDAP directory.
* Execute rsnapshot according to the users settings.
* Write the backup quotas backup (incoming), iterations (.snapshots) and free space to the users local backupSize file and update the LDAP directory.
* Inform the reseller, customer or user (depending on the settings in the LDAP directory) via mail, if the quota limit has been reached.
* Depending on the users settings in the LDAP directory, warning mail will be sent to the reseller, customer or user, if a backup was not executed on time.
 
=== rsnaphot configuration directory ===
The users individual rsnapshot configurations are stored under <code>/etc/rsnapshot</code>. Please make sure, that the directory exists:
ls -al /etc | grep rsnapshot
 
drwx------ 2 root root 64 30. Aug 20:20 rsnapshot
 
If not, create it:
mkdir /etc/rsnapshot
chmod 700 /etc/rsnapshot
 
=== snapshot.pl Configuration ===
The snapshot.pl script is responsible for the execution of rsnapshot according to the users settings.
/etc/backup-utils/snapshot.conf
<pre>
[General]
MaxParallelProcesses = 5
Rsnapshot_command = /usr/bin/nice -n 19 /usr/bin/rsnapshot -c /etc/rsnapshot/rsnapshot.conf.%uid% %interval%
 
[LDAP]
Host = ldaps://ldapm.tombstone.ch
Port = 636
User = cn=Manager,dc=stoney-cloud,dc=org
Password = <Password>
CA_Path = /etc/ssl/certs
Accounts_Base = ou=accounts,ou=backup,ou=services,dc=stoney-cloud,dc=org
</pre>
 
Legend:
* '''%uid%''': The backup account and login uid as a numeric number. For example: 4000205.
* '''%interval%''': The backup level to be executed. Possible values are hourly, daily, weekly, monthly and yearly.
 
=== snapshot.pl Test ===
Before adding the necessary cronjob entries, we need to make sure, that we've configured the snapshot.pl script correctly:
4000080
 
=== Cronjobs ===
crontab -e
<pre>
...
# Rsnapshot for all users
30 22 * * * /var/work/backup-util/bin/snapshot.pl --interval daily
15 22 * * sun /var/work/backup-util/bin/snapshot.pl --interval weekly
00 22 1 * * /var/work/backup-util/bin/snapshot.pl --interval monthly
...
</pre>
== schedule warning ==
SLB, editor, reviewer
3,368
edits