Changes

Jump to: navigation, search

stoney backup: Server set-up

841 bytes added, 12:09, 12 June 2014
/* stoney backup Service Software */
The stoney backup Service comes along with multiple scripts which help you to manage and monitor your backup server and accounts:
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. == writeAccountSize.pl'''==This script is installed to <code>/usr/libexec/backup-utils/writeAccountSize.pl</code> by the <code>sys-apps/sst-backup-utils</code> package and does the following: ** Calculates the used disk space (backup and iterations) for a given account and writes the corresponding values to:**# The LDAP backend (used by the selfcare webinterface to display quota information):**#* Backup space used (sstBackupSize): The disk space the account uses for the backup itself (disk space used under the <code>incoming</code> folder of the users chroot-home directory)**#* Snapshot space used (sstIncrementSize): The disk space the account uses for the iterations (disk space under the <code>.snapshot</code> folder of the users chroot-home directory)**# The file <code>etc/backupSize</code> of the accounts chroot (used by the Sepiola Online Backup client):** Checks if the user and/or reseller must be notified that there is no more disk space left for the given account*** Checks if the notification flag was passed, if not no notification will be triggered*** Calculates the used disk space (backup and iterations) in percentage*** Reads the notification threshold value from the LDAP backed*** If the disk space used (in percentage) is bigger than the value retrieved from the LDAP backend start the [[stoney_cloud:_Notification_Architecture notification]] process with**** Product: Given account UID**** Service: Backup**** Problem: Quota** Pod documentation:
<pre>
NAME
PerlUtil::LDAPUtil;
</pre>
* '''snapshot.pl''': Is used for ...
== Write Backup Account Size ==TBD: PKL (bitte bei allen Scripts angeben, aus welchem Päckli/ebuild es stammt). If you have already installed the [[Backup_(Server_Setup)#rsnapshot | rsnapshot]] script, you also have the writeAccountSize script. Otherwise follow [[Backup_(Server_Setup)#rsnapshot | these instructions (installation only)]] === Write Backup Account Size Configuration ===
/etc/backup-utils/writeAccountSize.conf
<pre>
</pre>
=== Write Backup Account Size Test Tests ===
/usr/libexec/backup-utils/writeAccountSize.pl -U 4000080 -d
<pre>
Everything seems to be working fine!
== Snapshots snapshot.pl ==We use rsnapshot This script is installed to <code>/usr/libexec/backup- remote filesystem utils/snapshot utility for .pl</code> by the actual snapshots <code>sys-apps/sst-backup-utils</code> package and a handful of wrapper scripts, that do things likedoes the following:* Read the users and their settings from the LDAP directory.interval parameter value passed* Execute rsnapshot according to the users settings.* Write the backup quotas backup (incoming)The interval parameter value can be daily, iterations weekly, monthly (.snapshotsor yearly) and free space to the users local backupSize file and update the LDAP directory.* Inform Find all backup active accounts for which the reseller, customer or user rsnapshot command must be executed (depending on the settings in the LDAP directorygiven interval) via mail, if the quota limit has been reached.* Depending on * Filter to find these accounts: <code>(&(sstBackupInterval<INTERVAL>=*)(sstIsActive=TRUE))</code> for example for the users settings in daily rsnapshot the LDAP directory, warning mail will be sent filter is <code>(&(sstBackupIntervalDaily=*)(sstIsActive=TRUE))</code>*** In other words this means: Get me all acounts that have for <code>sstBackupInterval<INTERVAL></code> a value defined AND <code>sstIsActive</code> is set to "TRUE"* According to the reseller, customer or user, interval given and the account UID calculate the rsnapshot command for all these accounts** For example*** Account UID: 4000000 *** Interval: daily*** Resulting rsnapshot command: /usr/bin/nice -n 19 /usr/bin/rsnapshot -c /etc/rsnapshot/rsnapshot.conf.4000000 daily (if a backup was not executed on timeyou use the [#snapshot.pl_Configuration | configuration] below)
=== rsnaphot configuration directory ===
The users individual rsnapshot configurations are stored under <code>/etc/rsnapshot</code>. Please make sure, that the directory exists:
486
edits