---
title: Synchronize a specific list of database elements
description: The resync command enables synchronizing a specific set of database keys that are read from a Java database connectivity (JDBC) Sync Source file using the --sourceInputFile option. The contents of the file are passed line-by-line into the listAllEntries() method of the JDBCSyncSource extension, which is used for the Sync Pipe. The method processes the input and returns DatabaseChangeRecord instances based on the input from the file.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdatasync_server_administration_guide:pd_sync_list_database_elements
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdatasync_server_administration_guide/pd_sync_list_database_elements.html
revdate: September 13, 2023
section_ids:
  about-this-task: About this task
  steps: Steps
---

# Synchronize a specific list of database elements

## About this task

The `resync` command enables synchronizing a specific set of database keys that are read from a Java database connectivity (JDBC) *(tooltip: \<div class="paragraph">
\<p>A Java API that allows Java programs to interact with databases.\</p>
\</div>)* Sync Source file using the `--sourceInputFile` option. The contents of the file are passed line-by-line into the `listAllEntries()` method of the `JDBCSyncSource` extension, which is used for the Sync Pipe. The method processes the input and returns `DatabaseChangeRecord` instances based on the input from the file.

Perform the following steps to synchronize a specific list of database elements using the `resync` command:

## Steps

1. Create a file of JDBC Sync Source elements. There is no set format for the file, but it typically contains a list of primary keys or SQL queries. For example, create a file containing a list of primary keys and save it as `sourceSQL.txt`.

   ```
   user.0
   user.1
   user.2
   user.3
   ```

2. Run the `resync` command with the `--sourceInputFile` option to run on individual primary keys in the file.

   ```shell
   $ bin/resync --pipe-name "dbsync-pipe" \
   --sourceInputFile sourceSQL.txt
   ```

3. If searching for a specific type of database entry, use the `--entryType` option that matches one of the configured entry types in the JDBCSyncSource.

   ```shell
   $ bin/resync --pipe-name "dbsync-pipe" \
   --entryType account \
   --sourceInputFile sourceSQL.txt
   ```
