Previous page

Next page

Locate page in Contents

Print this page

Backing Up Service Instance

On executing backup operation the script should back up all sensitive application data to a file. The Controller should ensure that the file is writable. The path to this file is provided in the BACKUP_FILE environment variable. How this variable gets is value (manually by user or automatically by a Controller ) is completely on the Controller implementation. Same set of variables as for configuration script should be passed to the backup script on its invocation.

Application resources like databases or mailboxes should be backed up as well. If the backup script declaration includes the sufficient element, such resources are serialized into backup file by means of the script. If the element is absent, it is the Controller responsibility to back up all involved resources. Consider this possibility in the Controller implementation.

The Controller should assure that application instance exists before starting backup operation.

Backing up service operation with backup script implies that the Controller performs the following steps:

  1. Determine backup script interpreter. To determine backup script interpreter, the Controller reads from the package metadata the identifier of the script's language (the value of the "//provision/backup-script/script-language" element). What interpreter must be used to run scripts written in a particular language is defined in the aspects, so the Controller must pass the identifier to the Aspects Parser. If the Aspects Parser supports the corresponding aspect, it returns the required interpreter information. Otherwise, the Controller must stop backing up service and roll back all the changes it has already done to the server.
  2. Run the script with the required interpreter passing to it all the required environment variables. If the script interpreter is identified successfully, the Controller runs the backup script with the backup argument using the interpreter and passing to the script all the environment variables. What variables must be passed to backup script is defined by the Specification in the 5.3.5.2. Environment Variables section.
  3. Check whether the script was executed successfully. If the backup script fails (returns non-zero exit code), it must be treated as a fatal error and the Controller must refuse to continue operation. The Controller should also capture the script stdout and stderr streams in order to log the error.

The configuration script definition may include structured-output element. In this case a script returns report on erroneous values in the form defined by the Specification. The Controller should catch output stream independently of error stream and process it. For details on script structured output, refer to the 5.3.2.3 Configuration script output section of the Specification.

See Also

Application Data Retention

Restoring Service Instance

Migrating Service Instance

Possible Scenario

Please send us your feedback on this help page