Difference between revisions of "stoney backup: OpenLDAP directory data organisation"

From stoney cloud
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Backup Account Example)
(Backup Account Example)
Line 1,461: Line 1,461:
 
| style="border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;"| sstBackupLastSuccessfulBackup
 
| style="border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;"| sstBackupLastSuccessfulBackup
 
| style="border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;"| <center>MAY</center>
 
| style="border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;"| <center>MAY</center>
| style="border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;"| <center>x</center>
+
| style="border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;"| <center></center>
 
| style="border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;"| <center></center>
 
| style="border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;"| <center></center>
 
| style="border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;"| <center></center>
 
| style="border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;"| <center></center>

Revision as of 13:01, 26 September 2013

Abstract

This document describes the OpenLDAP directory data organisation for the stoney cloud (Online) Backup service.

Data Organisation

The following chapters explain the data organisation of the stoney cloud OpenLDAP directory, in this case we looking at the (Online) Backup service.

Backup

The following LDIF shows the backup entry of the whole OpenLDAP directory tree for the stoney cloud:

dn: ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: organizationalUnit
objectclass: top
ou: backup

Backup Configuration

The sub tree for the configuration of the (online) backup service:

dn: ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
ou: configuration
description: The sub tree for the configuration of the (online) backup service.

Backup rsnapshot Provisioning Daemon

The sub tree for the configuration of the prov-backup-rsnapshot daemon:

dn: ou=prov-backup-rsnapshot,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
objectclass: sstServiceConfigurationObjectClass
ou: prov-backup-rsnapshot
description: The sub tree for the configuration of the prov-backup-rsnapshot daemon.
sstIsActive: TRUE

The following table describes the different attributes:

Attribute
Existence
Mandatory
Description
description
MAY
x
The description of the leaf.
sstIsActive
MAY
x
Is the entry active? Either true (yes) or false (no).

Legend:

  • x: Mandatory in all cases.

Backup Reseller

The sub tree for the reseller specific (online) backup service settings:

dn: ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
ou: reseller
description: The sub tree for the reseller specific (online) backup service settings.

The sub tree for the specific (online) backup service settings for the reseller Reseller Ltd. with the uid 4000000.

dn: uid=4000000,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: sstReseller
objectclass: sstServiceConfigurationObjectClass
uid: 4000000
o: Reseller Ltd.
description: The sub tree for the specific (online) backup service settings for the reseller Reseller Ltd. with the uid 4000000.
sstIsActive: TRUE
sstIsDefault: TRUE

The following table describes the different attributes:

Attribute
Existence
Mandatory
Selfcare
Changeable
Description
uid
MUST
x
A unique integer value with 7 digits or more. For example: 4000000.
o
MUST
x
The company name, for example: stepping stone GmbH.
description
MAY
x
The description of the leaf.
sstIsActive
MUST
x
Is the entry active? Either TRUE (yes) or FALSE (no).
sstIsDefault
MAY
Contains the leaf a default entry? Either TRUE (yes) or FALSE (no). If sstIsDefault is set to TRUE, this entry acts as a fall back configuration. In other words: If a reseller doesn't have his own (online) backup service configuration, then this on will be used.

Legend:

  • x: Mandatory in all cases.

Backup Reseller Billing

The sub tree for the billing information of the (online) backup service for the reseller Reseller Ltd. with the uid 4000000:

dn: ou=billing,uid=4000000,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
objectclass: TBD
ou: billing
description: The sub tree for the billing information of the (online) backup service for the reseller Reseller Ltd. with the uid 4000000.

TBD: Der Aufbau sollte so sein, dass er hierarchische Informationen abbilden könnte. Oder wir machen den normalen Billing Tree, den wir ursprünglich vorgeshene haben.

The following table describes the different attributes:

Attribute
Existence
Mandatory
Selfcare
Changeable
Description
ou
MUST
x
description
MAY
x
The description of the leaf.

Legend:

  • x: Mandatory in all cases.


Backup Reseller Backup Account Defaults

The sub tree for the backup account defaults for the (online) backup service for the reseller Reseller Ltd. with the uid 4000000:

dn: ou=defaults,uid=4000000,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
objectclass: sstBackup
ou: defaults
description: The sub tree for the default settings of the (online) backup service for the reseller Reseller Ltd. with the uid 4000000.
loginShell: /bin/sh
shadowMax: 99999
shadowWarning: 7
shadowFlag: 134539460
sstBackupWarningDays: 1
sstBackupWarningNumbers: 0
sstBackupWarningOn: FALSE
sstNotificationWarningLevel: 85
sstNotificationWarningMedium: mail
sstBackupSize: 0
sstIncrementSize: 0
sstBackupIntervalHourly: 0
sstBackupIntervalDaily: 7
sstBackupIntervalWeekly: 4
sstBackupIntervalMonthly: 3
sstBackupIntervalYearly: 0
sstUseSelfcare: FALSE
sstUseSSH: TRUE
sstIsActive: TRUE

The following table describes the different attributes:

Attribute
Existence
Mandatory
Selfcare
Changeable
Description
ou
MUST
x
description
MAY
x
loginShell
MAY
x
The path to the login shell. The default is /bin/sh.
shadowMax
MAY
x
Related to the /etc/shadow file, this attribute specifies the maximum number of days the password is valid. The default is 99999, which corresponds to about 273 years. In reality, this means, that the user does not need to change the password.
shadowWarning
MAY
x
Related to the /etc/shadow file, this attribute specifies the number of days before the password expires that the user is warned. The default is 7.
shadowFlag
MAY
x
Related to the /etc/shadow file, this attribute is currently not used and is reserved for future use. The default is set to 134539460.


sstVolumeCapacityDefault
MAY
x
sstVolumeCapacityMin
MAY
x
sstVolumeCapacityMax
MAY
x
sstVolumeCapacityStep
MAY
x
sstQuotaChange
MAY
x
Can the user change the quota? Either TRUE (yes) or FALSE (no). Default is FALSE (no).
sstBackupWarningDays
MUST
x
After how many missed backup days should the user be warned. Possible values are between 0 and 99. Default is 1.
sstBackupWarningNumbers
MUST
x
After how many missed backups should the user be warned. Possible values are between 0 and 99. Default is 0.
sstBackupWarningOn
MUST
x
Does the user want to informed about failed backups (TRUE) or not (FALSE).
sstNotificationWarningLevel
MUST
x
The quota notification level in percent, when the owner of the backup needs to warned. A value between 0 and 100. The default is 85 percent.
sstNotificationWarningMedium
MUST
x
The notification medium, either sms (points to the multi-valued attribute mobileTelephoneNumber) or mail (points to the multi-valued attribute mail). Currently, only mail is supported.
sstNotificationWarningMediumChange
MAY
x
Can a user change the notification warning medium? Either TRUE (yes) or FALSE (no). The default is FALSE (no).
sstNotificationWarningMediumAdd
MAY
x
Can a user add new notification warning mediums (mobileTelephoneNumber or mail? Either TRUE (yes) or FALSE (no). The default is TRUE (yes). Currently, only adding new mail addresses are supported.
sstBackupIntervalHourly
MUST
x
How many hourly backups do we want? The default is 0.
sstBackupIntervalDaily
MUST
x
How many daily backups do we want? The default is 7.
sstBackupIntervalWeekly
MUST
x
How many weekly backups do we want? The default is 4.
sstBackupIntervalMonthly
MUST
x
How many monthly backups do we want? The default is 3.
sstBackupIntervalYearly
MUST
x
How many yearly backups do we want? The default is 0.
sstIsActive
MUST
x
Is the backup account active? Either TRUE (yes) or FALSE (no). Default is TRUE (yes).
sstUseSelfcare
MUST
x
Can the selfcare interface be used with the credentials of the backup account? Either TRUE (yes) or FALSE (no). Default is FALSE (no).
sstUseSSH
MUST
x
Is the ssh service active for the backup account? Either TRUE (yes) or FALSE (no). Default is TRUE (yes).

Legend:

  • x: Mandatory in all cases.

Backup Reseller Backup Notification Settings

The sub tree stores the notification information for the (online) backup service for the reseller Reseller Ltd. with the uid 4000000. This information is used independently of the notification settings of the users. The idea is, that the reseller can receive notifications for a customer and reaction on the received information (for example, when the quota has been reached:

dn: ou=notifications,uid=4000000,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
objectclass: sstNotificationObjectClass
ou: notifications
description: The sub tree stores the notification information for the (online) backup service for the reseller Reseller Ltd. with the uid 4000000. This information is used independently of the notification settings of the users.
sstMailTo: Support stepping stone GmbH <support@stepping-stone.ch>
sstNotificationWarning: quota
sstNotificationWarning: schedule
sstNotificationWarning: unsuccessful

The following table describes the different attributes:

Attribute
Existence
Mandatory
Selfcare
Changeable
Description
ou
MUST
x
description
MAY
x
sstMailTo
MAY
x
sstNotificationWarning
MAY
This multi-valued attribute will be used to turn single notifications on or off. The attribute sstBackupWarningOn must be set to TRUE Possible values are quota, schedule and unsuccessful (the names correspond with the template dn).

Legend:

  • x: Mandatory in all cases.

Backup Reseller Backup Account Settings

The sub tree stores the information about what can be modified in which scope for the (online) backup service for the reseller Reseller Ltd. with the uid 4000000:

dn: ou=settings,uid=4000000,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
objectclass: sstServiceSettingsObjectClass
ou: settings
description: This sub tree stores the information about what can be modified in which scope.
sstVolumeCapacityDefault: 1073741824
sstVolumeCapacityMin: 1073741824
sstVolumeCapacityMax: 536870912000
sstVolumeCapacityStep: 1073741824
sstNotificationWarningMediumChange: FALSE
sstNotificationWarningMediumAdd: TRUE
sstQuotaChange: FALSE
sstSendCredentialsTo: owner
sstMailFrom: Support stepping stone GmbH <support@stepping-stone.ch>
preferredLanguage: de-CH

Human readable format:

  • sstVolumeCapacityDefault: 1 Gigabyte
  • sstVolumeCapacityMin: 1 Gigabyte
  • sstVolumeCapacityMax: 500 Gigabytes
  • sstVolumeCapacityStep: 1 Gigabyte

The following table describes how to calculate the sstVolumeCapacity* attributes:

Size Calculation Value
1 Byte
1 1
1 Kilobyte
1 x 1024 1024
1 Megabyte
1 x 1024 x 1024 1048576
1 Gigabyte
1 x 1024 x 1024 x 1024 1073741824
5 Gigabytes
5 x 1024 x 1024 x 1024 5368709120
10 Gigabytes
10 x 1024 x 1024 x 1024 10737418240
100 Gigabytes
100 x 1024 x 1024 x 1024 107374182400
500 Gigabytes
500 x 1024 x 1024 x 1024 536870912000
1 Terabyte
1 x 1024 x 1024 x 1024 x 1024 1099511627776

The following table describes the different attributes:

Attribute
Existence
Mandatory
Selfcare
Changeable
Description
ou
MUST
x
description
MAY
x
sstVolumeCapacityDefault
MAY
x
sstVolumeCapacityMin
MAY
x
sstVolumeCapacityMax
MAY
x
sstVolumeCapacityStep
MAY
x
  • Arrow left / Arrow right: 1 Gigabyte (sstVolumeCapacityStep)
  • Page up / Page down: 10 Gigabyte (10 x sstVolumeCapacityStep)
sstNotificationWarningMediumChange
MAY
x
Can a user change the notification warning medium? Either TRUE (yes) or FALSE (no). The default is FALSE (no).
sstNotificationWarningMediumAdd
MAY
x
Can a user add new notification warning mediums (mobileTelephoneNumber or mail? Either TRUE (yes) or FALSE (no). The default is TRUE (yes). Currently, only adding new mail addresses are supported.
sstQuotaChange
MAY
x
Can the user change the quota? Either TRUE (yes) or FALSE (no). Default is FALSE (no).
sstSendCredentialsTo
MAY
x
To whom do we send the access data or credentials. At least one entry must exist. Possible values:
  • sstSendCredentialsTo: login: The access data or credentials are sent to the person logged in.
  • sstSendCredentialsTo: owner: The access data or credentials are sent to the owner (person), the service belongs to.
sstMailFrom
MAY
x
The mail address, from which the credentials are to be sent from. In the example from above, this value is Support stepping stone GmbH <support@stepping-stone.ch>.
preferredLanguage
MAY
x
The notification language, which will be used to used in the mails, that are sent to the reseller, according to RFC 1766 (ISO 3166-1-alpha-2 code-ISO 639-1 Code. For example de-CH or en-GB.


Legend:

  • x: Mandatory in all cases.

Backup Reseller Templates

This sub tree contains the templates for the (online) backup service for the reseller Reseller Ltd. with the uid 4000000:

dn: ou=templates,uid=4000000,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
ou: templates
description: This sub tree contains the templates for the (online) backup service for the reseller Reseller Ltd. with the uid 4000000.
Backup Reseller Credentials Templates

This sub tree contains the quota templates for the (online) backup service:

dn: ou=credentials,ou=templates,uid=4000000,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
objectclass: sstTemplateSetup
ou: credentials
description: This leaf contains the credential templates for the (online) backup service.
sstMailFrom: Support stepping stone GmbH <support@stepping-stone.ch>
sstMailTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/credentials/credentials_mail
sstMailTemplateFormatSource: txt
sstMailTemplateFormatTarget: txt
sstTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/credentials/credentials_attachment
sstTemplateFormatSource: odt
sstTemplateFormatTarget: pdf

The following table describes the different attributes:

Attribute
Existence
Mandatory
Selfcare
Changeable
Description
ou
MUST
x
description
MUST
x
sstMailFrom
MAY
x
The mail address, from which the credentials are sent from. For example:
  • Support stepping stone GmbH <support@stepping-stone.ch>).

If this attribute does not exist, the

  • sstMailFrom

from

  • ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org

must be taken.

sstMailTo
MAY
If this multi-valued attribute is set with one or mail address(es), then these recipients will receive the same information as the login user or the owner, depending on the value of sstSendCredentialsTo under ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org. Normally, this attribute is not set for the credentials.
sstMailTemplate
MAY
x
The template, that is used to create the mail that is sent to either the user logged in (sstSendCredentialsTo: login) or to the owner of then newly created service (sstSendCredentialsTo: owner. For example:
  • sstTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/credentials/credentials_mail.
sstMailTemplateFormatSource
MAY
x
The format of the source template. Supported values:
  • txt
  • html

Place holder:

  • For both txt or html as a source and txt or html, the place holders have the form of {$placeholder}.

Default would normally be txt.

sstMailTemplateFormatTarget
MAY
x
The format of the target. Supported values:
  • txt
  • html
sstTemplate
MAY
x
The template, that is used to create the attachment that is sent with the mail. For example:
  • sstTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/credentials/credentials_attachment.
sstTemplateFormatSource
MAY
x
The format of the source template. Supported values:
  • txt
  • odt

Place holders:

  • If we have txt or html as a source and txt or html, the place holders have the form of {$placeholder}.
  • If we have odt as a source and odt or pdf as a target, then PHP-Easy-Report is used to replace the placeholders. These have the form of {{placeholder}}.

The complete path and file name is a string concatenation of the values of the attributes sstTemplate, preferredLanguage and sstTemplateFormatSource (with a dot in between the values). For example:

  • sstTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/credentials/credentials_attachment
  • preferredLanguage: en-GB
  • sstTemplateFormatSource: odt

This gives us:

  • file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/credentials/credentials_attachment.en-GB.ode

Default would normally be odt.

sstTemplateFormatTarget
MAY
x
The format of the target. Supported values:
  • txt
  • odt
  • pdf

Note to selfcare developer(s). Please be aware of the following issues when using PHP-Easy-Report:

  • Minor: Spaces (and other special characters) in the document file names are going to be a problem since the names don't get escaped.
  • Major: You must provide a manually-created unique temp-directory for the PHP-Easy-Report object, otherwise there will be race-conditions.

Default would normally be pdf.

Legend:

  • x: Mandatory in all cases.
Credentials Place Holders E-Mail (txt/html)

Address with an example:

{$company}                         stepping stone GmbH
{$salutation} {$name} {$surname}   Mr. Michael Eichenberger
{$address}                         Neufeldstrasse 9
{$country}-{$zip} {$location}      CH-3013 Bern

Date with an example:

{$day}                             16
{$month}                           August
{$year}                            2013

Backup Service with an example:

{$uid}                             4000124
{$password}                        XlWz4Qa#

Optional Values:

{$externalID}       12345
Credentials Place Holders LibreOffice (odt)

LibreOffice (odt) templates have the same place holders as the E-Mail (text/html) templates. The only thing that changes, are the definitions. Instead of {$placeholder} we have {{placeholder}}.

Backup Reseller Quota Templates

This sub tree contains the quota templates for the (online) backup service:

dn: ou=quota,ou=templates,uid=4000000,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
objectclass: sstTemplateSetup
ou: quota
description: This leaf contains the quota templates for the (online) backup service.
sstMailFrom: Support stepping stone GmbH <support@stepping-stone.ch>
sstMailTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/quota/quota_mail
sstMailTemplateFormatSource: txt
sstMailTemplateFormatTarget: txt
sstMailTemplateReseller: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/quota/quota_mail_reseller
sstMailTemplateFormatSource: txt
sstMailTemplateFormatTarget: txt

The following table describes the different attributes:

Attribute
Existence
Mandatory
Selfcare
Changeable
Description
ou
MUST
x
description
MUST
x
sstMailFrom
MAY
x
The mail address, from which the quota mails are sent from. For example:
  • Support stepping stone GmbH <support@stepping-stone.ch>.

If this attribute does not exist, the

  • sstMailFrom

from

  • ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org

must be taken.

sstMailTo
MAY
If this multi-valued attribute is set with one or mail address(es), then these recipients will receive the same information as the owner. Normally, this attribute is not set.
sstMailTemplate
MAY
x
The template, that is used to create the mail that is sent to the owner of the service if sstBackupWarningOn: TRUE and sstNotificationWarningMedium: mail. If the mail is not set, you must look for the mail in the owners person entry under uid=<UID>,ou=people,dc=stoney-cloud,dc=org.

For example:

  • sstTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/credentials/credentials_mail.
sstMailTemplateFormatSource
MAY
x
The format of the source template. Supported values:
  • txt
  • html

Place holder:

  • For both txt or html as a source and txt or html, the place holders have the form of {$placeholder}.

Default would normally be txt.

sstMailTemplateFormatTarget
MAY
x
The format of the target. Supported values:
  • txt
  • html
sstMailTemplateReseller
MAY
x1
The path and name to a template file, that is used to inform one or more people if the multi-valued attribute sstMailTo is set in the notifications sub tree of the reseller
  • ou=notifications,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=foss-cloud,dc=org

and if <code>sstNotificationWarning is set to quota. In most cased, the attribute sstMailTo is set to the support organisations mail address. For example:

  • sstMailTo: Support stepping stone GmbH <support@stepping-stone.ch&gt>

This way, the support organisation will be pre-informed for when the customer should call or write.

The information the recipients will receive, is the same as the owner, but will formatted according to:

  • sstTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/quota/quota_mail_reseller
  • sstMailTemplateResellerFormatSource: txt
  • sstMailTemplateResellerFormatTarget: txt
sstMailTemplateResellerFormatSource
MAY
x1
The format of the source template. Supported values:
  • txt
  • html

Place holder:

  • For both txt or html as a source and txt or html, the place holders have the form of {$placeholder}.

The complete path and file name is a string concatenation of the values of the attributes sstTemplate, preferredLanguage and sstTemplateFormatSource (with a dot in between the values). For example:

  • sstTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/quota/quota_mail_reseller
  • preferredLanguage: en-GB
  • sstTemplateFormatSource: txt

This gives us:

  • file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/quota/quota_mail_reseller.en-GB.txt

Default would normallb be txt.

sstMailTemplateResellerFormatTarget
MAY
x1
The format of the target. Supported values:
  • txt
  • html

Default would normallb be txt.

Legend:

  • x: Mandatory in all cases.
  • x1: Must exist, if sstMailTo is set.
Quota Place Holders E-Mail (txt/html)

An example:

{$salutation}       Mr.
{$surname}          Eichenberger
{$uid}              3723707
{$percent}          98
{$quota}            100
{$backup_size}      40
{$snapshot_size}    48

Optional Values:

{$externalID}       12345
Quota Place Holders LibreOffice (odt)

LibreOffice (odt) templates have the same place holders as the E-Mail (text/html) templates. The only thing that changes, are the definitions. Instead of {$placeholder} we have {{placeholder}}.

Backup Reseller Schedule Templates

This sub tree contains the schedule templates for the (online) backup service:

dn: ou=schedule,ou=templates,uid=4000000,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
objectclass: sstTemplateSetup
ou: schedule
description: This leaf contains the schedule templates for the (online) backup service.
sstMailFrom: Support stepping stone GmbH <support@stepping-stone.ch>
sstMailTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/schedule/schedule_mail
sstMailTemplateFormatSource: txt
sstMailTemplateFormatTarget: txt
sstMailTemplateReseller: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/schedule/schedule_mail_reseller
sstMailTemplateFormatSource: txt
sstMailTemplateFormatTarget: txt
Schedule Place Holders E-Mail (txt/html)

An example:

{$salutation}       Mr.
{$surname}          Eichenberger
{$scheduled_date}   01. August 2013
{$scheduled_time}   15:00
{$gecos}            Michael Eichenberger
{$computer}         my-laptop
{$last_success}     The last successful backup was made on the 03. July 2013 at 14:45
{$uid}              1234567

Optional Values:

{$externalID}       12345
Schedule Place Holders LibreOffice (odt)

LibreOffice (odt) templates have the same place holders as the E-Mail (text/html) templates. The only thing that changes, are the definitions. Instead of {$placeholder} we have {{placeholder}}.

Backup Reseller Unsuccessful Templates

This sub tree contains the unsuccessful templates for the (online) backup service:

dn: ou=unsuccessful,ou=templates,uid=4000000,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
objectclass: sstTemplateSetup
ou: unsuccessful
description: This leaf contains the schedule templates for the (online) backup service.
sstMailFrom: Support stepping stone GmbH <support@stepping-stone.ch>
sstMailTemplate: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/unsuccessful/unsuccessful_mail
sstMailTemplateFormatSource: txt
sstMailTemplateFormatTarget: txt
sstMailTemplateReseller: file:///var/www/selfcare/htdocs/themes/selfcare.tombstone.ch/templates/services/backup/unsuccessful/unsuccessful_mail_reseller
sstMailTemplateFormatSource: txt
sstMailTemplateFormatTarget: txt
Unsuccessful Place Holders E-Mail (txt/html)

An example:

{$salutation}       Mr.
{$surname}          Eichenberger
{$scheduled_date}   01. August 2013
{$scheduled_time}   15:00
{$gecos}            Michael Eichenberger
{$computer}         my-laptop
{$last_success}     The last successful backup was made on the 03. July 2013 at 14:45
{$uid}              1234567

Optional Values:

{$externalID}       12345

Example template:

Subject: Online Backup information for account {$uid}

{$salutation} {$surname}

Your backup for the account '{$gecos}' and the computer '{$computer}', scheduled for the {$scheduled_date} at {$scheduled_time}, was not successful.
{$last_success}

If the problem can be solved with a manual Backup, you may ignore this message. 
Otherwise please contact us under: support@stepping-stone.ch

Kind regards
your stepping stone GmbH support team

--
stepping stone GmbH
Neufeldstrasse 9
CH-3012 Bern

Telefon: +41 31 332 53 63
www.stepping-stone.ch
support@stepping-stone.ch

Which results in the following mail for the backup account 4000152:


Dear Mr. Kläy

Your backup for the account 'Pat Klaey' and the computer 'pat-GT60', scheduled for the 18. Aug 2013 at 17:15, was not successful.
The last successful backup was made the 01. July 2013 at 12:00

If the problem can be solved with a manual Backup, you may ignore this message. 
Otherwise please contact us under: support@stepping-stone.ch

Kind regards
your stepping stone GmbH support team

--
stepping stone GmbH
Neufeldstrasse 9
CH-3012 Bern

Telefon: +41 31 332 53 63
www.stepping-stone.ch
support@stepping-stone.ch
Unsuccessful Place Holders LibreOffice (odt)

LibreOffice (odt) templates have the same place holders as the E-Mail (text/html) templates. The only thing that changes, are the definitions. Instead of {$placeholder} we have {{placeholder}}.

Backup Accounts

The sub tree for the accounts of the (online) backup service:

dn: ou=accounts,ou=backup,ou=services,dc=foss-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
ou: accounts
description: The sub tree for the accounts of the (online) backup service.

Backup Account Example

Each (Online) Backup service account has it's own change root (chroot, jail) directory. The following example shows the OpenLDAP directory entry for the (online) backup account with the uid number 3723707:

dn: uid=3723707,ou=accounts,ou=backup,ou=services,dc=stoney-cloud,dc=org
objectclass: top
objectclass: account
objectclass: posixAccount
objectclass: shadowAccount
objectclass: sstBackup
objectclass: sstProvisioning
objectclass: sstRelationship
uid: 3723707
userPassword: {SSHA}E/KLUgeAtApAPQ7mG2GMddCxTE9m9QOS
uidNumber: 3723707
gidNumber: 3723707
cn: Michael Eichenberger
gecos: Michael Eichenberger
homeDirectory: /var/backup/7/707/723/3723707/chroot/./home/3723707
loginShell: /bin/sh
shadowLastChange: 11108
shadowMax: 99999
shadowWarning: 7
shadowFlag: 134539460
sstBackupIntervalHourly: 0
sstBackupIntervalDaily: 7
sstBackupIntervalWeekly: 4
sstBackupIntervalMonthly: 3
sstBackupIntervalYearly: 0
sstBackupWarningDays: 1
sstBackupWarningNumbers: 0
sstBackupWarningOn: TRUE
sstNotificationWarningLevel: 85
preferredLanguage: de-CH
sstNotificationWarningMedium: mail
sstUseSelfcare: FALSE
sstUseSSH: TRUE
sstIsActive: TRUE
sstQuota: 10737418240
sstBackupSize: 0
sstIncrementSize: 0
sstBackupLastSuccessfulBackup: 20130923T063554Z
sstProvisioningMode: add
sstProvisioningExecutionDate: 0
sstProvisioningState: 0
sstBelongsToResellerUID: 4000000
sstBelongsToCustomerUID: 4000001
sstBelongsToPersonUID: 4000002

The following table describes the different attributes:

Attribute
Existence
Mandatory
Selfcare
Changeable
Description
uid
MUST
x
x
The unique identifier (uid). This attribute is created by the selfcare interface by reading (and incrementing) the next free uid from "cn=nextfreeuid,ou=administration,dc=stoney-cloud,dc=org".
userPassword
MAY
x
x
x
Identifies the entry's password and encryption method in the following format: {encryption method}encrypted password. For example: {SSHA}zBiT1dHAZh/8zbCeyocRVWhdP0j9xJ3U. This password will be automatically set through the selfcare interface. Afterwords, the password can be changed by the user (including the reseller and customer).
uidNumber
MUST
x
Related to the /etc/shadow file, this attribute specifies the user's login ID. Is the same as the uid. For example: 3723707.
gidNumber
MUST
x
Group ID number. Is the same as the uid. For example: 3723707.
cn
MUST
x
givenName and Surname. Will be used for the presentation in the interface. TBD
gecos
MAY
x
x
x
Named for historical reasons, the GECOS field is mandatory and is used to store extra information (such as the user's full name). Utilities such as finger or getent access this field to provide additional user information. For a personal account, this entry would consist of givenName and surname, for example Michael Eichenberger. These values are taken from the owners entry (ou=people). For a service account, the attribute sstDisplayName from the corresponding service would be used for the content of this attribute. Please be aware, that this attribute is a IA5String (OID=1.3.6.1.4.1.1466.115.121.1.26) IA5 (almost ASCII) character set (7-bit). Does NOT allow extended characters e.g. é, Ø, å etc. The selfcare interface automatically creates the content of this attribute. The user (including the reseller and customer) can modify this attribute as desired (except for the IA5 restrictions).

You can use:
~ $ echo "Tüpfelhyänenöhrchen" | iconv -f 'utf-8' -t 'ASCII//TRANSLIT'
which gives you:
Tuepfelhyaenenoehrchen
or:
iconv("UTF-8", "ASCII//TRANSLIT", "Tüpfelhyänenöhrchen")
Please be aware, that some characters don't get converted properly ... For example: Ø and £. The characters $ and € work.

homeDirectory
MUST
x
The directory path corresponds with the 7 digit account uid. The following example describes, how the directory structure is built up for the account with the uid 3723707.

/var/backup/g/efg/bcd/abcdefg/chroot/./home/abcdefg
/var/backup/7/707/723/3723707/chroot/./home/3723707 This attribute is created by the selfcare interface.

loginShell
MAY
x
The path to the login shell. The default is /bin/sh and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
shadowLastChange
MAY
x
Related to the /etc/shadow file, this attribute specifies number of days between January 1, 1970, and the date that the password was last modified. Must be set to the day, that the password was set (must be updated, when the password is changed). This attribute is created by the selfcare interface.
shadowMax
MAY
x
Related to the /etc/shadow file, this attribute specifies the maximum number of days the password is valid. The default is 99999, which corresponds to about 273 years. In reality, this means, that the user does not need to change the password. This attribute is created by the selfcare interface. The value is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
shadowWarning
MAY
x
Related to the /etc/shadow file, this attribute specifies the number of days before the password expires that the user is warned. The default is 7 and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
shadowFlag
MAY
x
Related to the /etc/shadow file, this attribute is currently not used and is reserved for future use. The default is set to 134539460 and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstBackupIntervalHourly
MUST
x
x1
How many hourly backups do we want? The default is 0 and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstBackupIntervalDaily
MUST
x
x1
How many daily backups do we want? The default is 7 and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstBackupIntervalWeekly
MUST
x
x1
How many weekly backups do we want? The default is 4 and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstBackupIntervalMonthly
MUST
x
x1
How many monthly backups do we want? The default is 3 and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstBackupIntervalYearly
MUST
x
x1
How many yearly backups do we want? The default is 0 and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstBackupWarningDays
MUST
x
x1
If the attribute sstBackupWarningOn ist true, a non-successful backup notification warning is sent after X days of non-successful backups (where X is an integer number larger than zero). X is an integer number larger than 1. 0 means, the warning is turned off. The default is 1 and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstBackupWarningNumbers
MUST
x
x1
If the attribute sstBackupWarningOn ist true, a non-successful backup notification warning is sent after X non-successful backups. X is an integer number larger than 1. 0 means, the warning is turned off. The default is 0 and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstBackupWarningOn
MUST
x
Is the non-successful backup notification warning turned on or not? Either true (yes) or false (no). Default is true (yes) and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstNotificationWarning
MAY
This multi-valued attribute will be used to turn single notifications on or off. The attribute sstBackupWarningOn must be set to TRUE Possible values are quota, schedule and unsuccessful (the names correspond with the template dn).
preferredLanguage
MAY
x
x2
x
The notification language according to RFC 1766 (ISO 3166-1-alpha-2 code-ISO 639-1 Code. For example de-CH or en-GB. The content of this value is taken from the person entry from the attribute preferredLanguage. If the backup account belongs to a service, the user must be asked for the notification language.
sstNotificationWarningLevel
MUST
x
x2
x
The quota notification level in percent, when the owner of the backup needs to warned. A value between 0 and 100. The default is 85 percent and is taken from the "ou=defaults,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstNotificationWarningMedium
MUST
x
The notification medium, either sms (points to the multi-valued attribute mobileTelephoneNumber) or mail (points to the multi-valued attribute mail). Currently, only mail is supported. This is the default is taken from the "ou=defaults,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstQuota
MAY
x
x
x
The filesystem quota in bytes. 10737418240 Bytes equal 10 Gigabytes. The user can change the quota, if the sstQuotaChange is set to TRUE. See "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstBackupSize
MAY
x
x
The size of the actual backup in bytes. Default is 0 and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry. This attribute will be updated by the writeAccountSize.pl script, which is called during the daily backup run by the rsnapshotPostExecWrapper.sh script.
sstIncrementSize
MAY
x
x
The size of all the incremental backups combined in bytes. This attribute will be updated by the writeAccountSize.pl script, which is called during the daily backup run by the rsnapshotPostExecWrapper.sh script.
mobileTelephoneNumber
MAY
Multi-valued attribute with the mobile phone number(s) that is used for the notification of the user(s), if the attribute sstBackupWarningOn ist true and the attribute sstNotificationWarningMedium ist set to sms. Currently, only adding new mail addresses are supported, therefore this attribute is not used for the moment.
mail
MAY
x2
x2
x
Multi-valued attribute with the E-Mail addresse(s) that is used for the notification of the user(s), if the attribute sstBackupWarningOn ist TRUE and the attribute sstNotificationWarningMedium ist set to mail. If sstNotificationWarningMediumAdd is set to TRUE and the backup service belongs to a personal account, the mail entry would be taken from the owners entry (ou=people). For a backup service belonging to another serviĉe, the selfcare would ask the user for the mail address.
sstIsActive
MUST
x
Is the backup account active? Either TRUE (yes) or FALSE (no). Default is TRUE (yes) and is taken from the "ou=defaults,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstUseSelfcare
MUST
x
Can the selfcare interface be used with the credentials of the backup account? Either TRUE (yes) or FALSE (no). Default is FALSE (no) and is taken from the "ou=defaults,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstUseSSH
MUST
x
Is the ssh service active for the backup account? Either TRUE (yes) or FALSE (no). Default is TRUE (yes) and is taken from the "ou=settings,uid=<UID>,ou=reseller,ou=configuration,ou=backup,ou=services,dc=stoney-cloud,dc=org" entry.
sstBackupLastSuccessfulBackup
MAY
The date and time of the last successful backup in UTC, either 0 or in the form of [YYYY][MM][DD]T[hh][mm][ss]Z (ISO 8601).
sstProvisioningMode
MUST
x
The provisioning mode, either add, modify or delete. For a new account, this attribute must be set to add. See Provisioning for details.
sstProvisioningExecutionDate
MUST
x
The date the provisioning shall occur in the form of [YYYY][MM][DD] (ISO 8601). For a new account, this attribute must be set to 0. See Provisioning for details.
sstProvisioningReturnValue
MAY
The provisioning return value written by the prov-backup-rsnapshot daemon. 0 means success, >0 means failure. See the prov-backup-rsnapshot Exit Codes for detailed information.
sstProvisioningState
MUST
x
The provisioning state, either 0 or in the form of [YYYY][MM][DD]T[hh][mm][ss] (ISO 8601). For a new account, this attribute must be set to 0. See Provisioning for details.
sstBelongsToResellerUID
MUST
x
Stores the reseller UID the leaf belongs to.
sstBelongsToCustomerUID
MUST
x
Stores the customer UID the leaf belongs to.
sstBelongsToPersonUID
MAY
x3
Stores the person UID the leaf belongs to.
sstBelongsToServiceUID
MAY
x3
Stores the service UID the leaf belongs to.

Legend:

  • x: Mandatory in all cases.
  • x1: Only show, if the number is larger than zero.
  • x2: Only show, if sstBackupWarningOn is set to TRUE.
  • x3: Either sstBelongsToPersonUID or sstBelongsToServiceUID must bei set.

Backup Groups

The sub tree for the groups of the (online) backup service:

dn: ou=groups,ou=backup,ou=services,dc=foss-cloud,dc=org
objectclass: top
objectclass: organizationalUnit
ou: groups
description: The sub tree for the groups of the (online) backup service.

Backup Group Example

dn: cn=3723707,ou=groups,ou=backup,ou=services,dc=foss-cloud,dc=org
objectclass: top
objectclass: posixGroup
objectclass: sstRelationship
cn: 3723707
gidNumber: 3723707
sstIsActive: TRUE
sstBelongsToResellerUID: 4000000
sstBelongsToCustomerUID: 4000001
sstBelongsToPersonUID: 4000002
  • Entscheid chroot-Umgebung. TMU/CAF/PKL/MEI
    • chroot-Umgebung mit einer Kombination von busybox, Jailkit und dem täglich ablaufendem Backup-Script (als aufrufende Instanz)
    • rsync vom Host (als static Binary)
    • busybox vom Host (als static Binary)
  • Verzicht auf Bind-Mount (.snapshots ist read only) -> CAF
  • LDAP Struktur -> MEI/TMU
  • Neuer Backup Server aufbauen (Gleicher Fingerprint) -> TMU/MEI
  • Backup Script (prov-backup-rsnapshot) -> PKL
  • SSHA Umstellung bei den Passwörtern -> MEI/CWI

Provisioning

Die Provisionierung benötigt die drei Attribute sstProvisioningMode und sstProvisioningState und sstProvisioningExecutionDate. Ablauf:

  1. sstProvisioningMode: Die Applikation Selfcare beschreibt das Attribut sstProvisioningMode mit den Werten add, modify der delete.
    1. sstProvisioningMode: add: Der Service soll hinzugefügt werden. Dieser Fall muss mehrmals nacheinander aufgerufen werden können. Beispiel: Bei Online Backup wurde die chroot-Umgebung bereits erstellt, dann müsste ein add nur noch kontrollieren, ob die chroot-Umgebung aktuell ist, falls nicht, müssten die entsprechenden Punkte aktualisiert werden.
    2. sstProvisioningMode: modify: Der Service soll modifiziert werden.
    3. sstProvisioningMode: delete: Der Service soll gelöscht werden.
  2. sstProvisioningExecutionDate: Die Applikation Selfcare beschreibt das Attribut sstProvisioningExecutionDate mit dem gewünschten Ausführungszeitpunkt. Zwei Fälle:
    1. 0: Dies bedeutet "sofort" und wird durch den Provisionierungs-Daemon provisioning.pl ausgewertet.
    2. [YYYY][MM][DD]: Das gewünschte Ausführungsdatum (ISO 8601). Muss mindestens ein Tag später als das aktuelle Datum sein, da diese Attribut durch ein alle 24 Stunden aufgerufenes Aufräum-Script gelesen wird. Der genaue Ausführungszeitpunkt kann somit nicht bestimmt werden (da abhängig vom Ausführungszeitpuntk der Aufräum-Scripts und der Anzahl anstehenden Aufgaben).
  3. sstProvisioningState: Die Applikation Selfcare oder der Provisionierungs-Daemon provisioning.pl beschreiben das Attribut sstProvisioningState:
    1. Keine Provisionierung nötig: Falls eine Änderung keine Provisionierung im Backend verlangt (zum Beispiel bei einer Passwört-Änderung), wird das Attribut sstProvisioningState direkt durch die Applikation Selfcare it dem aktuellen Datum und der aktuellen Zeit in Form von [YYYY][MM][DD]T[hh][mm][ss] ausfüllen (ISO 8601) beschrieben. In diesem Falle ignoriert der Provisionierungs-Daemon provisioning.pl die Modifikation.
    2. Provisionierung nötig: Falls eine Änderung eine Provisionierung im Backend verlangt (zum Beispiel bei einer Quota-Änderung), muss die Applikation Selfcare dieses Attribut auf den Wert 0 setzen. Nach der erfolgreichen Provisionierung muss Provisionierungs-Daemon provisioning.pl das Attribut sstProvisioningState mit dem aktuellen Datum und der aktuellen Zeit in Form von [YYYY][MM][DD]T[hh][mm][ss] ausfüllen (ISO 8601).

Die Applikation Selfcare darf erst dann wieder eine Modifikation durch einen Benutzer zulassen, wenn das Attribut sstProvisioningState einen gültigen Zeitstempel in der Form von [YYYY][MM][DD]T[hh][mm][ss] (ISO 8601) hat. Technisch gesehen muss der Provisionierungs-Daemon provisioning.pl im RefreshAndPersist Modus nur noch auf die LDAP-Mechanismen add und modify hören. Der LDAP-Mechanismus delete muss ignoriert werden.

Links