Complete System Backup

JFrog Artifactory Documentation

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.

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.

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.

Note

Backup content is stored in standard file system format and can be loaded into any repository, so that Artifactory never locks you out.

Prerequisites

Today, in a lot of customer 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, the user will need to set up access for all nodes to have write access to the mount for creating a backup. Alternatively, the user can exclude all nodes from managing cluster-wide tasks except for a single node. This will mimic today’s behavior, where there is only one primary node that can write to the NFS mount.High Availability

If you are moving to Cloud-Native High Availability on HA, it is recommend to 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).

In the Backups page you may select an existing Backup to edit, or click New to create a new Backup.

edit_daily_backup.png

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

The default is $JFROG_HOME/artifactory/var/backup/artifactory/[backup_key]

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

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.