arrow-down
    1. Widgets
  1. IAM
    1. Virtual apps
    1. Projects
    2. Layers
        1. AttachmentUploader
        2. Checkbox
        3. Combobox
        4. ContentSelector
        5. ContentTypeFilter
        6. CustomSelector
        7. Date
        8. DateTime
        9. Double
        10. GeoPoint
        11. HtmlArea
        12. ImageSelector
        13. Long
        14. MediaSelector
        15. Radiobutton
        16. Tag
        17. TextArea
        18. TextLine
        19. Time
      1. Field set
      2. Item set
      3. Option set
      4. Mixins
      5. Localization
    3. Content Types
    4. X-data
    5. Macros
    6. Custom styles
    7. Sites
      1. Regions
      2. Part component
      3. Layout component
      4. Text component
      5. Fragments
      6. Filtering
      7. Component indexing
      8. Visual editor
    8. Page templates
    1. Sandboxes
    2. Code
    3. Building
    4. Configuration
    1. Globals
    2. HTTP
    3. Controllers
    4. Filters
    5. Events
    6. Websocket
    7. Error handler
    8. ID provider
    9. Tasks
    10. Localization
    11. Mappings
    12. Components
    13. Processors
    14. Contributions
    15. Templating
    16. Main controller
    17. Java bridge
      1. Webapp Engine
        1. Image service
        2. Component service
      2. Admin Engine
      3. Asset service
      4. HTTP service
      5. IDprovider service
    1. Task engine
    2. Management Endpoint
    3. Statistics Endpoint
    1. Nodes and repos
    2. Properties
    3. Indexing
    4. Branches
    5. Queries (NoQL)
    6. Queries (DSL)
    7. Filters
    8. Aggregations
    9. Highlighting
    10. Editors
    1. Strategies
    2. Distributions
    3. Docker image
    4. Vhosts
    5. Configuration
    6. Backup & restore
    7. Systemd
    8. Clustering
    1. Admin API
    2. Application API
    3. Auditlog API
    4. Authentication API
    5. Cluster API
    6. Common API
    7. Content API
    8. Context API
    9. Event API
    10. Export API
    11. Grid API
    12. I18N API
    13. IO API
    14. Mail API
    15. Node API
    16. Portal API
    17. Project API
    18. Repo API
    19. Scheduler API
    20. Schema API
    21. Tasks API
    22. Value API
    23. VHost API
    24. Websocket API
  2. Audit Logs
    1. Upgrade Notes
    2. Upgrading Apps

Backup and restore

Contents

This section describes how to manage and backup your XP data

Introduction

XP persists two different types of data, that are both crucial for backing up and restoring the system.

Blobs

XP persists most of its data as files - aka blobs. Blobs are both text files (data) and binary files.

XP’s blobstore implementation uses a so-called append-only approach. This simply means that blobs are created once, and used for reading - but they are never updated at a later point. This eliminates traditional file-system problems like locking, and enables aggressive caching. The blobstores are effective since as a single blob may be re-used for a vast number of data nodes created in XP.

For clustered deployments, the blobs must be stored on a dedicated shared/distributed filesystem.

Indicies

In addition to blobs, XP also creates and stores indicies. Indicies are automatically replicated across all data nodes (if you have a cluster).

There are essentially two types of indexes.

  • The search index which can be updated or re-created through re-indexing.

  • The metadata index contain critical repository, branch and tree structure information, as well as version history.

The metadata indicies are required in order to restore XP to a working state, where as the search index may be re-generated from the combination of meta-data and blobstore.

Indicies MUST always be stored on a local filesystem, preferably using fast SSDs.

Useful tools

Enonic XP offers both management endpoints, and internal APIs to manage your data.

As an alternative to working with the APIs. Check out the following tools:

Snapshot - restore

XP offers the ability to quickly snapshot, and restore the indices of your system at any time.

Snapshots normally complete within seconds. Once you have a snapshot, you may restore that snapshot at a later time.

Snapshots will only restore the metadata and search index of your instance, not the blobs. As such, you must have an intact blobstore from the time the snapshot was taken.

If you for instance have performed a Vacuum operation, cleaning up items of age > 10 days - Restoring an 11 days old snapshot will bring your solution into an inconsistent state.

Snapshot and restore commands can be performed by using Enonic CLI, the API or a management application from Enonic Market.

Backing up XP

To perform a proper backup of XP, complete the following steps in the specified order:

  1. Take a Snapshot of your instance.

  2. Backup the files in your snapshots folder to a safe location

  3. Backup the files in your blobstore folder to a safe location

Restoring XP

To restore XP from a backup, perform the following steps in the specified order:

If you are restoring to the same environment as the backup was performed, you may skip the first step in this list.
  1. Deploy and start a new instance of XP, using the same version that was used to create your backup.

  2. Copy the blobstore backup files into your instance’s blobstore folder

  3. Copy the snapshot backup files into your instance’s snapshots folder.

  4. Using CLI, or via Admin console/Data Toolbox: Perform a Snapshot restore

After completing the restore, XP will restart all of it’s core services, and return to normal service.

To guarantee a 100% healthy instance after a successful restore, perform a full restart your instance (all nodes if you run a cluster).

Data migration

In addition to backing up and restoring your data, XP also provides solutions for migrating data between instances.

Export and import

You may export and import tree structures of nodes, or even single leaf nodes using the Export and Import feature. Exporting will produce a human-readable export of the selected repo/branch/node and it’s child items.

An export contains metadata and blobs required to re-create the selected nodes in current state. You may import any valid export, but pay attention as export/import will keep your existing node identifiers.

Exporting and importing can be performed by using Enonic CLI, the API or a management application from Enonic Market.

Export and import is limited to work basic current data. They do not include metadata such as version history, branches or commits.

Dump and load

You may dump and load your entire system. Dumping will produce a machine readable file that can be used for loading at a later time.

The dump may also include the version history for your data.

Dumping and loading can be performed by using Enonic CLI, the API or a management application from Enonic Market.

Dumping is not a recommended backup solution, rather use snapshots in combination with a backup of up your blobstore

Data management

Vacuuming

Even if you delete nodes in your storage, the blobs and selected metadata are not permanently removed from XP.

Deleting the blobs would actually prevent you from easily rolling back to a previous snapshot.

To permanently delete the remaining metadata and blogs in a controlled fashion, XP offers a function called Vacuuming.

Vacuuming first removes the remaining metadata, and then effectively removes the blobs that are no longer referenced.

Vacuuming can be setup to execute automatically as a scheduled job, or manually triggered via for instance the CLI.

Contents

Contents

AI-powered search

Juke AI