Trigger a Full Sync
Run a Full Sync in JFrog Artifactory to copy missing files between Federation members.
Perform a Full Sync operation to synchronize all events between Federation members when regular synchronization is incomplete.
Who can perform this task: Platform Administrators
Prerequisites:
- Users running Artifactory 7.71.1+ should try auto-healing or manual Federation recovery before resorting to Full Sync
When to Use Full Sync
In certain cases, it might not be possible to synchronize all metadata events between Federation members. For example, if two members are disconnected for a long period (more than three days), old events might be deleted from the queue, making it impossible to copy those events after restoring the connection.
A Full Sync operation synchronizes all events in one JPD by copying any missing files to designated remote JPDs. However, Full Sync doesn't synchronize deleted events.
For example, if a file was deleted from JPD A but the event wasn't propagated to the remote site (JPD B) before the event was purged, running Full Sync on JPD B (where the file still exists) restores the file on JPD A. Therefore, if you need to synchronize the entire Federation, you must run Full Sync on all members.
Warning
A Full Sync operation can be time-consuming if the Federated repositories contain many artifacts, as this amounts to restarting the Federation.
Running a Full Sync
Full Sync is performed using the Federated Repository Full Sync REST API. You can synchronize specific Federated repositories or all the Federation repositories.
How Full Sync Works
When you initiate a Full Sync operation:
- The query is sent to the remote member, which begins compiling a file list of the repository's contents.
- The local JPD polls the remote JPD every 30 seconds to check whether the file list is ready. This polling method removes the need to keep the connection open for a long period.
- When ready, the remote JPD sends its file list to the local JPD for comparison with the local file list.
- The Full Sync operation begins, copying missing files.
flowchart LR
trigger["Full Sync\ntriggered"] --> compile["Remote member compiles\nfile list"]
compile --> poll["Local JPD polls\nevery 30 seconds"]
poll --> ready{"File list\nready?"}
ready -->|No| poll
ready -->|Yes| compare["Compare local and\nremote file lists"]
compare --> copy["Copy missing files"]
copy --> complete["Member returns\nto Healthy"]
classDef component fill:#41b375,stroke:#389b65,stroke-width:1px,color:#fff;
classDef secondary fill:#ffffff,stroke:#41b375,stroke-width:1.5px,color:#41b375;
class trigger,compile,poll,compare,copy,complete component;
class ready secondary;
linkStyle default stroke:#8e9aaf,stroke-width:1.5px;
When the Full Sync operation completes successfully, the member's state returns to Healthy (HEALTHY). If the operation fails, the member is flagged ERROR_OUT_OF_SYNC and may require another Full Sync attempt.
Note
The following property in
artifactory.system.propertiesdefines the polling interval (default:30seconds):artifactory.federated.full.sync.pooling.wait.time.sec=30.
When using the Artifactory Federation Service (RTFS), a Full Sync operation that is interrupted can resume using a previously published file list instead of regenerating the list from the beginning. RTFS treats published file lists older than the configured time-to-live (TTL) as stale. For more information, see RTFS Properties for Full Sync File List Resume.
Perform Full Sync from a File
For very large Federated repositories, you can run a Full Sync operation using a pre-generated file list instead of compiling the remote file list over the network. This approach is available when the Artifactory Federation Service (RTFS) is enabled. Contact JFrog Support if you need access to this workflow.
The procedure is similar to legacy in-Artifactory Federation, except that the Full Sync file is placed on the local RTFS member filesystem (not on the Artifactory node). RTFS detects the file automatically and uses it as the remote member file list, skipping the remote fetch and polling steps.
Set Up the Source JPD
Perform the following steps on the JPD from which you want to trigger the Full Sync operation (the source or initiating member).
-
Exclude the repository from standard Full Sync by setting the following Artifactory system property to a comma-separated list of repository keys:
artifactory.federated.full.sync.exclude.reposFor example:
fed1,fed2,fed3This prevents accidental triggers of the standard Federated Repository Full Sync REST API against the repository while you prepare the file-based workflow. The Federated Repository Force Full Sync REST API is used to run the operation in the final step.
-
Enable in-memory sorting for Full Sync operations. When RTFS is enabled, configure the RTFS property under
rtfs.persistence.federationPropertiesinsystem.yamlor Helm values:rtfs: persistence: federationProperties: rtfs.sync.in.memory.sort.enabled: "true"Restart Artifactory after updating the configuration. For legacy Federation (without RTFS), use
artifactory.federated.repo.full.sync.enabled.inMemorySorterinstead. See Bulk Mirroring Configuration.
Create the Full Sync File
On the target JPD (the remote Federation member whose metadata you want to gather), trigger the Create Full Sync File REST API:
POST /artifactory/api/fullsync/createFileSample request body:
{
"repoKey": "fed2",
"targetRepo": "example-repo-local",
"path": "path/to"
}| Property | Description |
|---|---|
repoKey | The repository key on the target instance that is Federated with the source instance repository. |
targetRepo | The target repository where the Full Sync file is saved. |
path | The path within the target repository where the file is saved. Do not include the target repository name in the path. |
The API creates the Full Sync file in the target repository and path you specify. The file name is <REPO_KEY>_fullsync_result.
Warning
Do not rename the Full Sync file after it is created.
Copy the file from the target repository to the initiating JPD for the next step.
Deploy the Full Sync File on the Local RTFS Member
On the source JPD (where you trigger Full Sync), copy the Full Sync file to the RTFS filesystem on the local RTFS member.
Directory:
$RTFS_HOME/var/data/rtfs/tmp/work/fullSyncFile name:
<REMOTE_REPO_KEY>_<HOST>_fullsync_result| Placeholder | Description |
|---|---|
<REMOTE_REPO_KEY> | The repository key of the remote Federation member you are syncing with (the same value as repoKey in the create-file request). |
<HOST> | The host authority of the remote member's platform URL (the host and port, if present, from the remote JPD URL registered in Federation). For example, if the remote platform URL is https://remote-site.example.com/artifactory, use remote-site.example.com. |
Example file name: fed2_remote-site.example.com_fullsync_result
Note
With legacy in-Artifactory Federation (no RTFS), place the file at
$ARTIFACTORY_HOME/var/data/artifactory/tmp/work/fullSyncusing the name<REPO_KEY>_fullsync_result(without the hostname suffix).
Run the Full Sync File
On the source JPD, trigger the Force Full Sync REST API:
POST /artifactory/api/federation/forceFullSync/<REPO_KEY>Replace <REPO_KEY> with the local Federated repository key. You can optionally pass a mirror query parameter to sync with a specific remote member only.
This API works like the standard Full Sync API, but RTFS uses the pre-placed file at $RTFS_HOME/var/data/rtfs/tmp/work/fullSync/<REMOTE_REPO_KEY>_<HOST>_fullsync_result as the remote member file list instead of fetching it from the remote JPD.
Note
If in-memory sorting is not enabled, or if the Full Sync file is missing or the file name does not match the expected
<REMOTE_REPO_KEY>_<HOST>_fullsync_resultpattern, the operation fails or RTFS falls back to fetching the remote file list over the network.
RTFS Properties for Full Sync File List Resume
When a Full Sync operation is interrupted (for example, by an RTFS restart), RTFS can resume using a previously published file list rather than compiling a new list from scratch. The rtfs.file.list.published.ttl.min property controls how long those published file lists remain valid:
- Default TTL:
30minutes. Any file list published more than 30 minutes ago is treated as stale. - Disable reuse: Set the value to
0so RTFS always generates a new file list on resume instead of reusing a published one. - Trade-off: A higher TTL speeds up resume after an interruption, but increases the chance RTFS resumes from an outdated file list if the repository already received newer metadata events. Consider a lower TTL, or
0, if artifacts changed significantly during the interruption.
The TTL drives two behaviors that share the same cutoff:
- Reuse vs. regenerate on resume: When resuming a Full Sync, RTFS reuses a published file list if it's still within the TTL. If the file list is stale, RTFS unpublishes it and regenerates a new file list.
- Cleanup of unused file lists: A scheduled cleanup job deletes published file-list task rows older than the TTL when the repository is not in use.
Configure this property under rtfs.persistence.federationProperties in system.yaml or Helm values:
rtfs:
persistence:
federationProperties:
rtfs.file.list.published.ttl.min: "30"Restart Artifactory after updating the configuration. See RTFS Configuration.
| Property | Description |
|---|---|
rtfs.file.list.published.ttl.min | Defines how long (in minutes) a published Full Sync file list remains valid before it is treated as stale. Default value is 30. Set to 0 to force RTFS to always generate a new file list on resume (no reuse). On resume, stale file lists are unpublished and regenerated. A scheduled cleanup job also deletes published file-list task rows older than this TTL when the repository is not in use. A higher value keeps file lists reusable longer but may resume from a list that does not reflect newer metadata events received after the list was published. |
Use the Federation Comparison Tool for a Dry Run
Note
This feature requires Artifactory 7.104.2 or later and the Artifactory Federation Service must be installed.
The Federation Comparison tool performs a dry run of a Full Sync operation and returns the results in a JSON file. It compares the state of a Federated repository with one or more remote members to detect missing artifacts without actively synchronizing.
To use the Federation Comparison tool:
-
Set the
isDryquery parameter in the Full Sync REST API totrue:curl -X POST "https://<ARTIFACTORY_INSTANCE>/artifactory/api/federation/fullSync/testDryFullSyncRepo?mirror=https://mirror-instance/artifactory/my-repo&isDry=true" \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ -H "Content-Type: application/json"Where:
- <ARTIFACTORY_INSTANCE>: The URL of your Artifactory instance
- <ACCESS_TOKEN>: Your access token. For security, do not use a real token in examples. Use <ACCESS_TOKEN> as a placeholder
Sample response:
{
"message": "Dry full sync completed successfully.",
"resultPaths": [
"jfrog-full-sync-info/comparison-results/testDryFullSyncRepo-mirror-comparison-2025-02-04.json"
]
}Sample report contents:
{
"results": [
{
"name": "testDryFullSyncFile_1.txt",
"type": "file",
"fullPath": "folder/testDryFullSyncFile_1.txt"
},
{
"name": "testDryFullSyncFile_2.txt",
"type": "file",
"fullPath": "folder/testDryFullSyncFile_2.txt"
}
]
}The report is stored in the jfrog-full-sync-info system repository. The API response provides the path to the report.
System Properties for Full Sync File List Queries
The following Artifactory system properties define how to execute file list queries for Full Sync operations on Federated repositories.
| Property | Description |
|---|---|
artifactory.federated.full.sync.use.aql | When set to true (default), Artifactory uses a single AQL query to create the Full Sync file list. When set to false, Artifactory uses one or more SQL queries to create the Full Sync file list. |
The following properties are relevant only when artifactory.federated.full.sync.use.aql is set to false:
| Property | Description | Default |
|---|---|---|
artifactory.federated.full.sync.paging.threshold | If the number of artifacts for the file list is greater than this threshold, the file list is generated from multiple queries (paging). If the number of artifacts is smaller than this threshold, the data for all artifacts is loaded using a single query. | 400000 |
artifactory.federated.full.sync.page.size | When using paging to generate the Full Sync file list, this property defines the page size: the number of rows read by each database query. | 100000 rows |
artifactory.federated.full.sync.pages.per.file | Defines the number of pages placed in a single, temporary file to allow efficient sorting of the data. | 4 |
Frequently Asked Questions
This section provides answers to frequently asked questions.
FAQs
Q: When should I use Full Sync instead of relying on auto-healing?
A: Try auto-healing or manual Federation recovery first if you're running Artifactory 7.71.1+. Use Full Sync when those don't resolve the issue, or when members have been disconnected long enough that old events were purged from the queue.
Q: Does Full Sync also synchronize deleted artifacts?
A: No. Full Sync copies missing files but doesn't synchronize deleted events. If you need deletions to propagate, they must sync through normal event processing rather than Full Sync.
Q: How can I preview what a Full Sync would change without actually running it?
A: Use the Federation Comparison tool with the isDry query parameter set to true. It returns a JSON report of missing artifacts without synchronizing anything.
Q: Can I run Full Sync from a pre-generated file instead of over the network?
A: Yes, when the Artifactory Federation Service (RTFS) is enabled. See Perform Full Sync from a File to generate the file on the target JPD and deploy it on the source JPD's local RTFS member.
Related Topics
Updated about 7 hours ago
