Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOCU-2801

...

alignright
classmenu

...

...

...

...

...

...

...

The Backup module allows you to take manual and scheduled backups of content and configuration. The module backs up Magnolia configuration and all versions of content in all workspaces. Manual and automated scheduled backups can be managed in the Backup app. Backup and restore scripts are provided for more flexible backup options and for restoring Magnolia.

Info
Multiexcerpt
MultiExcerptNamebackup-2.3-for-M5.7

(warning) If you are using the backup module on Magnolia 5.7.x - you must use Magnolia backup module version 2.3 or higher.

Table of Contents

Installing

Include Page
_Maven is the easiest way to install
_Maven is the easiest way to install

Artifact maven dependencies snippet
groupIdinfo.magnolia
artifactIdmagnolia-module-backup

...

Code Block
<dependency>
  <groupId>info.magnolia</groupId>
  <artifactId>magnolia-module-backup</artifactId>
</dependency>

...

  • Artifact resource link
    groupIdinfo.magnolia
    artifactIdmagnolia-module-backup
    label$artifactId.jar
    renderTypedownload_link
    resourceTypeJAR

Backup app

The Backup app allows you to make a manual backup, schedule automatic backups and view existing backup tasks. The tool creates a backup of the entire Magnolia installation.

...

info.magnolia.module.backup.AutomatedBackupConfiguration is the bean that holds the backup configuration.

config

optional

Module configuration node.

tasks

optional

Tasks folder.

backupTasks

required

Name of task.

automatedExecution

required

Automated execution node.

cron

required

CRON expression that sets the scheduled execution time.

enabled

optionaldefault is false

Enables and disables the task.

class

required

Javadoc
0

name

required

Task name.

targetPath

required

Path to the backup directory. The path must be absolute.

...

The backup script provides more flexibility for backing up Magnolia. Options include backing up a single workspace or file, and running a backup from a running Magnolia instance. The backup  script is in the bin folder in the Backup module bundle and needs to be run in a CLIfrom the command line.

Info

If choose to use the script, make sure that library versions referenced by the script after the update are the same as the versions in Magnolia you are currently running.

Usage:

Code Block
xml
xml
./bin/backup [options]

...

To restore the previously backed up data, use the restore script in the bin folder in the Backup module bundleThe restore script needs to be run in a CLI. from the command line.

The restore script is meant to recreate an instance, not to patch an existing one. For it to work correctly you should clean your database schema before running it.

...

-c--configuration <arg>

required

Location of the repository configuration.

magnolia.repositories.jackrabbit.config property.

-r--repository <arg>

required

Location of the repository to restore.

magnolia.repositories.home property property followed by the repository name (default: magnolia).

-s--source <arg>

required

Source location of the backup.

-z--zip

optional

Restore from a compressed ZIP archive.

...

0

info.magnolia.module.backup.commands.BackupCommand starts the backup execution process both both manual and automated requests.

commands

optional

Commands folder.

backup

required

Backup catalog.

backup

required

Command name

class

required

Javadoc

repositoryPath

required, default is magnolia.repositories.home property

Location of the repository to back up.

configurationPath

required, default is magnolia.repositories.jackrabbit.config property

Location of the repository configuration.

backupLocation

required

Target location of the backup.

compression

optional, default is false

When set to true backup is compressed in a ZIP archive.

retryTimeout

optional, default is 30 seconds

Interval in seconds for retrying backup execution when an exception occurs.

maxRetries

optional, default is 3

Maximum number of retries when encountering an exception.

...