ARTIFACTORY: Why is my backup failing?

Aviv Blonder
2023-01-22 11:09

Artifactory backup might fail due to several reasons. In order to identify what is the root cause, start by going over$ARTIFACTORY_HOME/logs/artifactory.log.

The main and most common issues are:

1. Not enough space on disk. In this case, you will see errors such as this in the log:
2022-04-05T01:47:34.927Z [jfrt ] [ERROR] [hrf213a2adc4a60b] [o.a.r.d.i.DbExportBase:138 ] [art-exec-471 ] – Failed to export '/opt/jfrog/artifactory/var/backup/artifactory/backup-daily/current/repositories/generic-local/my-file.txt’ due to:No space left on device: No space left on device

To resolve this, simply free up space in the target device. You may check the storage summary before running the backup by going to Administration tab –> Monitoring | Storage.

Other disk space errors are:

2022-05-03T17:40:11.325Z [jfrt ] [ERROR] [917rg63xp7ra109y] [o.a.b.BackupJob:93 ] [art-exec-5 ] – Not enough free space to perform backup. A threshold for max used space is exceeded before the backupbackup-daily

Or,
2022-05-06T09:11:25.509Z [jfrt ] [ERROR] [3p0kd03xp9mm1za6] [o.a.b.BackupJob:93 ] [art-exec-4 ] – Not enough free space to perform backup. A threshold for max used space is going to be exceeded after the backupbackup-daily

This occurs when at least 90% of the storage space is being used, or if this percent will be used after the backup process is done. You may change this percent with this system property:
artifactory.backup.maxUsedSpacePercent=90

2. Permissions on the backup folder. If the target backup folder has wrong permissions, the log should look like this:
2022-05-13T00:14:58.686Z [jfrt ] [ERROR] [472240fd3fa241ad] [o.a.b.BackupSizeCalculator:98 ] [art-exec-24 ] – Can't estimate free space in backup target location path. Skipping a check for 'max used space before backup' threshold.
java.nio.file.AccessDeniedException: /root/bkp

2022 - 05 - 13 t00:14:58.690z [jfrt][ERROR] [472240fd3fa241ad] [o.a.b.BackupJob:136 ] [art-exec-24 ] – An error occurred while performing a backup: Backup directory provided in configuration: '/root/bkp' cannot be created or is not a directory.

Or:
2022-05-13T00:18:45.625Z [jfrt ] [ERROR] [a732bc8d69a31063] [ifactoryApplicationContext:768] [art-exec-6 ] – Failed to create backup dir: /opt/jfrog/artifactory/var/backup/artifactory/backup-daily/current: Unable to create directory /opt/jfrog/artifactory/var/backup/artifactory/backup-daily/current

In order to overcome this, make sure that the user who starts Artifactory has sufficient permissions to create the desired backup directory.

3. NFS unavailable. In some cases, you will want to save the backup content in an NFS share volume. Therefore, this NFS mount should be available throughout the backup process.

*Note: log messages may vary between Artifactory versions.

If your backup is failing and you still can't find the reason, please contact JFrog Support via the Support Portal.