Changes

Jump to: navigation, search

stoney backup: Server set-up

3,579 bytes added, 11:37, 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:
* '''writeAccountSize.pl''': ** 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 writeAccountSize.pl DESCRIPTION This Script gets quota information from filesystem, size of incoming and snapshots directories, write the data to a file and the LDAP backend and sends an e-mail message for each account that is over quota to users e-mail address (from ldap directory) if notification flag is passed.  The configuration file for this script is stored in the backup-utils configuration directory (/etc/backup-utils/) and is called writeAccountSize.conf.  The script needs access to the quota program to get quota information. The script needs ldap access to get users e-mail address and quota information. The script uses syslog for logging purposes.  Command Line Interface (CLI) parameters:  -C configfile The configuration file.  -U uid The user id.  -n notification Start notification process if quota threshold is reached  -d debug Turns the debug mode on.  -h help This online help. USAGE writeAccountSize.pl -C configuration file [-U uid ] [-d debug] [-h help] [-n] CREATED 2009-04-16 michael.rhyner@stepping-stone.ch created VERSION 2009-04-16 michael.rhyner@stepping-stone.ch created 2009-04-30 michael.rhyner@stepping-stone.ch changed position based quota output parsing with correctly parsed elements 2009-06-15 michael.rhyner@stepping-stone.ch added over quota check and sending e-mail 2009-06-16 michael.rhyner@stepping-stone.ch renamed script and make it more general usable (e.g. for online backup, online storage, ...) 2009-06-17 michael.rhyner@stepping-stone.ch changed mail message to read from a text file instead from configuration parameter 2009-06-18 michael.rhyner@stepping-stone.ch corrected wrong regex to weed out the asterisk (*) in getQuotaSize 2009-06-19 michael.rhyner@stepping-stone.ch corrected wrong evaluation success from subroutines and avoid message output when not in debug mode 2009-06-22 michael.rhyner@stepping-stone.ch getQuotaSize: return immediately if no quota was set 2009-06-24 michael.rhyner@stepping-stone.ch alert when used certain percentge of allowed space instead of more than allowed space 2009-06-26 michael.rhyner@stepping-stone.ch values are presented in Gigabytes within notification message 2009-07-23 michael.rhyner@stepping-stone.ch corrected wrong syslog severities for errors 2009-07-24 michael.rhyner@stepping-stone.ch made e-mail address available within message body 2013-08-19 pat.klaey@stepping-stone.ch write quota values also to the LDAP INCORPORATED CODE Incorporate code with use:  warnings; strict; Config::IniFiles; Getopt::Std; Sys::Syslog; File::Basename; Text::Template; POSIX; Notification; PerlUtil::Logging; PerlUtil::LDAPUtil;</pre>
* '''snapshot.pl''': Is used for ...
486
edits