Skip to main content
XCP

sync

Contributors netapp-aoife

View the descriptions, parameters, and examples for the XCP sync command, including when the sync command is used with the dry run option.

sync

The XCP NFS sync command scans for changes and modifications to a source NFS directory by using a catalog index tag name or the number of a previous copy operation. Incremental changes to the source are copied and applied to the target directory. The old catalog index numbers are replaced with new ones after the sync operation.

Note During the sync operation, modified files and directories are copied to the destination NFSv3 export again.
Syntax
xcp sync -id <catalog_name>
Important The -id <catalog_name> parameter is required with the sync command.
Show example
[root@localhost linux]# ./xcp sync -id autoname_copy_2020-03-04_01.10.22.338436

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync -id autoname_copy_2020-03-04_01.10.22.338436
0 scanned, 0 copied, 0 modification, 0 new item, 0 delete item, 0 error
Speed : 26.4 KiB in (27.6 KiB/s), 22.7 KiB out (23.7 KiB/s)
Total Time : 0s.
STATUS : PASSED

The following table lists the sync parameters and their description.

Parameter Description

sync -id <catalog_name>

Specifies the catalog name of a previous copy index. This is a required parameter for the sync command.

sync -nonames

Excludes user and group names from file listings and reports.

sync -bs <n[k]>

Specifies the read/write block size (default: 64k).

sync -dircount <n[k]>

Specifies the request size when reading directories.

sync -parallel <n>

Specifies the maximum number of concurrent batch processes (default: 7).

sync -preserve-atime

Restores all files to the last accessed date on the source.

sync -nonames

Use the the -nonames parameter with the sync command to exclude user and group names from file listings or reports.

Syntax
xcp sync -id <catalog_name> -nonames
Show example
[root@localhost linux]# ./xcp sync -id ID001 -nonames

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync -id ID001 -nonames
0 scanned, 0 copied, 0 modification, 0 new item, 0 delete item, 0 error
Speed : 26.4 KiB in (22.2 KiB/s), 22.3 KiB out (18.8 KiB/s)
Total Time : 1s.
STATUS : PASSED

sync -bs <n[k]>

Use the the -bs <n[k]> parameter with the sync command to specify the read/write block size. The default block size is 64k.

Syntax
xcp sync -id <catalog_name> -bs <n[k]>
Show example
[root@localhost linux]# ./xcp sync -id ID001 -bs 32k

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync -id ID001 -bs 32k
0 scanned, 0 copied, 0 modification, 0 new item, 0 delete item, 0 error
Speed : 25.3 KiB in (20.4 KiB/s), 21.0 KiB out (16.9 KiB/s)
Total Time : 1s.
STATUS : PASSED

sync -dircount <n[k]>

Use the the -dircount <n[k]> parameter with the sync command to specify the request size when reading directories. The default value is 64k.

Syntax
xcp sync -id <catalog_name> -dircount <n[k]>
Show example
[root@localhost linux]# ./xcp sync -id ID001 -dircount 32k

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync -id ID001 -dircount 32k
0 scanned, 0 copied, 0 modification, 0 new item, 0 delete item, 0 error
Speed : 25.3 KiB in (27.8 KiB/s), 21.0 KiB out (23.0 KiB/s)
Total Time : 0s.
STATUS : PASSED

sync -parallel

Use the the -parallel parameter with the sync command to specify the maximum number of concurrent batch processes. The default value is 7.

Syntax
xcp sync -id <catalog_name> -parallel <n>
Show example
[root@localhost linux]# ./xcp sync -id ID001 -parallel 4

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync -id ID001 -parallel 4
0 scanned, 0 copied, 0 modification, 0 new item, 0 delete item, 0 error
Speed : 25.3 KiB in (20.6 KiB/s), 21.0 KiB out (17.1 KiB/s)
Total Time : 1s.
STATUS : PASSED

-preserve-atime

Use the the -preserve-atime parameter with the sync command to restore all files to the last accessed date on the source.

The -preserve-atime option resets the access time to the original value set before the XCP read operation.

Syntax
xcp sync -preserve-atime -id <catalog_name>
Show example
[root@client-1 linux]# ./xcp sync -preserve-atime -id XCP_copy_2022-06-30_14.22.53.742272

xcp: Job ID: Job_XCP_copy_2022-06-30_14.22.53.742272_2022-06-30_14.27.28.660165_sync
xcp: Index: {source: 101.10.10.10:/source_vol, target: 10.201.201.20:/dest_vol}
xcp: diff 'XCP_copy_2022-06-30_14.22.53.742272': 55 reviewed, 55 checked at source, 1 modification,
54 reindexed, 23.3 KiB in (15.7 KiB/s), 25.1 KiB out (16.9 KiB/s), 1s.
xcp: sync 'XCP_copy_2022-06-30_14.22.53.742272': Starting search pass for 1 modified directory...
xcp: find changes: 55 reviewed, 55 checked at source, 1 modification, 55 re-reviewed, 54 reindexed,
28.0 KiB in (18.4 KiB/s), 25.3 KiB out (16.6 KiB/s), 1s.
xcp: sync phase 2: Rereading the 1 modified directory...
xcp: sync phase 2: 55 reviewed, 55 checked at source, 1 modification, 55 re-reviewed, 1 new dir, 54
reindexed, 29.2 KiB in (19.0 KiB/s), 25.6 KiB out (16.7 KiB/s), 1s.
xcp: sync 'XCP_copy_2022-06-30_14.22.53.742272': Deep scanning the 1 modified directory...
xcp: sync 'XCP_copy_2022-06-30_14.22.53.742272': 58 scanned, 55 copied, 56 indexed, 55 reviewed, 55
checked at source, 1 modification, 55 re-reviewed, 1 new dir, 54 reindexed, 1.28 MiB in (739
KiB/s), 1.27 MiB out (732 KiB/s), 1s.
Xcp command : xcp sync -preserve-atime -id XCP_copy_2022-06-30_14.22.53.742272
Stats : 58 scanned, 55 copied, 56 indexed, 55 reviewed, 55 checked at source, 1 modification,
55 re-reviewed, 1 new dir, 54 reindexed
Speed : 1.29 MiB in (718 KiB/s), 1.35 MiB out (755 KiB/s)
Total Time : 1s.
Migration ID: XCP_copy_2022-06-30_14.22.53.742272
Job ID : Job_XCP_copy_2022-06-30_14.22.53.742272_2022-06-30_14.27.28.660165_sync
Log Path : /opt/NetApp/xFiles/xcp/xcplogs/Job_XCP_copy_2022-06-30_14.22.53.742272_2022-06-
30_14.27.28.660165_sync.log
STATUS : PASSED

sync dry-run

The sync command with the dry-run option looks for changes or modifications made to the source NFS directory using the previous catalog index number of a copy operation. This command also detects files and directories that are new, moved, deleted, or renamed since the previous copy operation. The command reports the source changes but does not apply them to the target.

Syntax
xcp sync dry-run -id <catalog_name>
Important The -id <catalog_name> parameter is required with the sync dry-run command option.
Show example
[root@localhost linux]# ./xcp sync dry-run -id ID001

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync dry-run -id ID001
0 matched, 0 error
Speed : 15.2 KiB in (46.5 KiB/s), 5.48 KiB out (16.7 KiB/s)
Total Time : 0s.
STATUS : PASSED

The following table lists the sync dry-run parameters and their description.

Parameter Description

sync dry-run -id <catalog_name>

Specifies the catalog name of a previous copy index. This is a required parameter for the sync command.

sync dry-run -stats

Performs a deep scan of the modified directories and reports everything that is
new.

sync dry-run -l

Prints details about files and directories that changed.

sync dry-run -nonames

Excludes user and group names from file listings and reports.

sync dry-run -dircount <n[k]>

Specifies the request size when reading directories.

sync dry-run -parallel <n>

Specifies the maximum number of concurrent batch processes (default: 7).

sync dry-run -id <catalog_name>

Use the the -id <catalog_name> parameter with sync dry-run to specify the catalog name of a previous copy index.

Important The -id <catalog_name> parameter is required with the sync dry-run command option.
Syntax
xcp sync dry-run -id <catalog_name>
Show example
[root@localhost linux]# ./xcp sync dry-run -id ID001

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync dry-run -id ID001
0 matched, 0 error
Speed : 15.2 KiB in (21.7 KiB/s), 5.48 KiB out (7.81 KiB/s)
Total Time : 0s.
STATUS : PASSED

sync dry-run -stats

Use the the -stats parameter with sync dry-run to perform a deep scan of the modified directories and report everything that is new.

Syntax
xcp sync dry-run -id <catalog_name> -stats
Show example
[root@localhost linux]# ./xcp sync dry-run -id ID001 -stats

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
4,895 reviewed, 43,163 checked at source, 12.8 MiB in (2.54 MiB/s), 5.49 MiB out (1.09 MiB/s),
5s
4,895 reviewed, 101,396 checked at source, 19.2 MiB in (1.29 MiB/s), 12.8 MiB out (1.47 MiB/s),
10s
Xcp command : xcp sync dry-run -id ID001 -stats
0 matched, 0 error
Speed : 22.9 MiB in (1.74 MiB/s), 17.0 MiB out (1.29 MiB/s)
Total Time : 13s.
STATUS : PASSED

sync dry-run -l

Use the the -l parameter with sync dry-run to print details about files and directories that changed.

Syntax
xcp sync dry-run -id <catalog_name> -l
Show example
[root@localhost linux]# ./xcp sync dry-run -id ID001 -l

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync dry-run -id ID001 -l
0 matched, 0 error
Speed : 15.2 KiB in (13.6 KiB/s), 5.48 KiB out (4.88 KiB/s)
Total Time : 1s.
STATUS : PASSED

sync dry-run -nonames

Use the the -nonames parameter with sync dry-run to exclude user and group names from file listings or reports.

Syntax
xcp sync dry-run -id <catalog_name> -nonames
Show example
[root@localhost linux]# ./xcp sync dry-run -id ID001 -nonames

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync dry-run -id ID001 -nonames
0 matched, 0 error
Speed : 15.2 KiB in (15.8 KiB/s), 5.48 KiB out (5.70 KiB/s)
Total Time : 0s.
STATUS : PASSED

sync dry-run -dircount <n[k]>

Use the the -dircount <n[k]> parameter with sync dry-run to specify the request size when reading directories. The default value is 64k.

Syntax
xcp sync dry-run -id <catalog_name> -dircount <n[k]>
Show example
[root@localhost linux]# ./xcp sync dry-run -id ID001 -dircount 32k

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync dry-run -id ID001 -dircount 32k
0 matched, 0 error
Speed : 15.2 KiB in (32.5 KiB/s), 5.48 KiB out (11.7 KiB/s)
Total Time : 0s.
STATUS : PASSED

sync dry-run -parallel

Use the the -parallel parameter with sync dry-run to specify the maximum number of concurrent batch processes. The default value is 7.

Syntax
xcp sync dry-run -id <catalog_name> -parallel <n>
Show example
[root@localhost linux]# ./xcp sync dry-run -id ID001 -parallel 4

xcp: Index: {source: <IP address or hostname of NFS server>:/source_vol, target: <IP address of
destination NFS server>:/dest_vol}
Xcp command : xcp sync dry-run -id ID001 -parallel 4
0 matched, 0 error
Speed : 15.2 KiB in (25.4 KiB/s), 5.48 KiB out (9.13 KiB/s)
Total Time : 0s.
STATUS : PASSED