Complete System Backup

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

You can automatically and periodically backup the entire Artifactory system. The backup process creates a time-stamped directory in the target backup directory. Backup content is stored in standard file system format and can be loaded into any repository, so that Artifactory never locks you out.

Note

  • Backing up very large filestores: If you are backing up more than 1TB of storage, refer to this article for instructions.

  • Deleting outdated files to reduce backup storage: It is recommended to manually delete the access.backup.<timestamp>.json file created when performing backup or system export. This file can be found in the $JFROG_HOME/artifactory/var/backup/access/ folder.

Prerequisites

In some user environments, the primary node is specifically configured with access to some NFS mount for Artifactory backups. With the introduction of Cloud-Native High Availability, where any node can create a backup, you need to set up access for all nodes to have write access to the mount for creating a backup. Alternatively, you can exclude all nodes from managing cluster-wide tasks except for a single node.High Availability

Path for Backup File

Starting from Artifactory version 7.66.x, the server path to backup can no longer start with $JFROG_HOME/artifactory directory. Therefore, you must store the backup outside the JFrog directory. The artifactory user must have access to the backup folder.

If you have any backups configured with the $JFROG_HOME/artifactory directory, you need to modify the path.

If you are moving to Cloud-Native High Availability on HA, we recommend that you have a shared drive path for backup paths (if you use a local drive path, the backup will be saved in whichever node triggers the backup operation, which can lead to confusion).

Note

To define multiple backups, in the Administration module, select Artifactory | Backups. Each backup may have its own schedule and repositories to either process or exclude.

To create a system backup:

  1. In the navigation panel on the left-hand side of the screen, click Administration administration-button.jpg.

  2. In the General section of this screen, click Settings. The Artifactory General Settings screen appears.

  3. In the Services pane, click Backups. Backup settings are displayed.

    edit_daily_backup.png
  4. From the top right-hand corner of the screen, click New Backup. The Backup Settings window is displayed. If previously configured, you can also choose an existing backup and change its properties.

  5. Configure backup settings as required. When completed click Save. Settings are saved and the Backup is run when scheduled.

    Field

    Description

    Enabled

    When selected, the backup is enabled.

    Backup Key

    A unique logical name for this backup.

    Cron Expression

    A valid CRON expression that you can use to control backup frequency. For example, to back up every 12 hours use a value of: 0 0 /12 * * ?

    Next Time Backup

    When the next backup is due to run.

    Server Path for Backup

    The directory to which local repository data should be backed up as files

    Each run of this backup will create a new directory under this one with the timestamp as its name.

    Path for Backup File

    Starting from Artifactory version 7.66.x, the server path to backup can no longer start with $JFROG_HOME/artifactory directory. Therefore, you must store the backup outside the JFrog directory. The artifactory user must have access to the backup folder.

    If you have any backups configured with the $JFROG_HOME/artifactory directory, you need to modify the path.

    Send Mail to Admins if there are Backup Errors

    If set, all Artifactory administrators will be notified by email if any problem is encountered during backup.

    Exclude New Repositories

    To exclude new repositories, you'll need to add the artifactory-build-info repository to the Excluded Repositories.

    Verify enough disk space is available for backup

    If set, Artifactory will verify that the backup target location has enough disk space available to hold the backed up data. If there is not enough space available, Artifactory will abort the backup and write a message in the log file.

    Incremental

    When set, this backup should be incremental. In this case, only changes from the previous run will be backed up, so the process is very fast.

    The backup directory name will be called current (as opposed to using the timestamp).

    The backup files can be used by any incremental file-system based backup utility (such as rsync).

    Retention Period Hours

    The number of hours to keep a backup before Artifactory will clean it up to free up disk space. Applicable only to non-incremental backups.

    Warning

    Do not store any custom files under the target backup directory, since the automatic backup cleanup processes may delete them!

    Back up to a Zip Archive (Slow and CPU Intensive)

    If set, backups will be created within a Zip archive.

Monitoring Backup Progress

During a system backup, Artifactory writes several messages to the $JFROG_HOME/artifactory/var/log/artifactory-service.log file. To monitor the backup process, look for messages that indicate the beginning and the end of a full system export as in the following example:

2016-06-09 02:00:00,023 [art-exec-1] [INFO ] (o.a.s.ArtifactoryApplicationContext:508) - Beginning full system export...
...
2016-06-09 02:00:00,357 [art-exec-1] [INFO ] (o.a.s.ArtifactoryApplicationContext:620) - Full system export completed successfully.