LUSTRE\_RSYNC(8) Lustre Configuration Utilities LUSTRE\_RSYNC(8)

# [NAME](#NAME)

lustre\_rsync - Utility to replicate a Lustre Filesystem

# [SYNOPSIS](#SYNOPSIS)

`lustre_rsync` {**--source**|**-s** *SRC*} {**--target**|**-t** *TGT*} {**--mdt**|**-m** *MDT*} \[**--user**|**-u** *USER*ID*]* \[**--xattr**|**-x** {**yes**|**no**}] \[**--verbose**|**-v**] \[**--statuslog**|**-l** *LOG*] \[**--dry-run**] \[**--abort-on-err**]

`lustre_rsync` {**--statuslog**|**-l** *LOG*}

`lustre_rsync` {**--statuslog**|**-l** *LOG*} {**--source**|**-s** *SOURCE*} {**--target**|**-t** *TGT*} {**--mdt**|**-m** *MDT*}

# [DESCRIPTION](#DESCRIPTION)

**lustre\_rsync** is designed to replicate a Lustre filesystem (source filesystem) to another target filesystem (any filesystem type) efficiently by using Lustre MDT changelogs. A changelog user must be registered (see [lctl (8)](/man/enterprise-packages/lustre/lctl.8) changelog\_register) before using this tool.

The source and the target filesystems must be identical before the changelog user is registered. If the filesystems are discrepant, a utility like rsync may be used to make them identical.

# [OPTIONS](#OPTIONS)

[**-s**, **--source=SRC**](#s)

The path to the root of the Lustre filesystem which will be replicated. Mandatory if a valid statuslog created during an previous replication operation (--statuslog) is not specified.

[**-t**, **--target=TGT**](#t)

The path to the root where the filesystem we be replicated. Mandatory if a valid statuslog created during an previous replication operation (--statuslog) is not specified. This option can be repeated if multiple replication targets are desired.

[**-m**, **--mdt=MDT**](#m)

The metadata device which is to be replicated. A changelog user must be registered for this device. Mandatory if a valid statuslog created during an previous replication operation (--statuslog) is not specified.

[**-u**, **--user=USER\_ID**](#u)

The changelog user id for the above MDT device. See [lctl(8)](/man/enterprise-packages/lustre/lctl.8) changelog\_register. Mandatory if a valid statuslog created during an previous replication operation (--statuslog) is not specified.

[**-l**, **--statuslog=LOG**](#l)

A status log file to which the status of replication is saved. When lustre\_rsync is started, the state from a previous replication will be read from here.

If a statuslog from a previous replication operation is specified, the otherwise mandatory options like --source, --target and --mdt may be skipped.

By specifying the options like --source, --target and --mdt in addition to the --statuslog option, the parameters in the statuslog can be overridden. The command line options take precedence over the ones from the statuslog.

[**-x**, **--xattr** {**yes**|**no**}](#x)

Specify whether extended attributes are replicated or not. The default is to replicate extended attributes. Disabling xattrs will mean that Lustre striping information will not be replicated.

[**-v**, **--verbose**](#v)

Produce a verbose output.

[**--dry-run**](#dry-run)

Shows what the program would do without actually replicating data.

[**--abort-on-err**](#abort-on-err)

Stop processing upon first error. Default is to continue processing.

# [EXAMPLES](#EXAMPLES)

Register a changelog consumer for MDT lustre-MDT0000:

```
# ssh $MDS lctl changelog_register --device lustre-MDT0000 -n
cl1
```

Replicate the lustre filesystem /mnt/lustre to /mnt/target:

```
# lustre_rsync --source=/mnt/lustre --target=/mnt/target --mdt=lustre-MDT0000 --user=cl1 --statuslog replicate.log --verbose
Lustre filesystem: lustre
MDT device: lustre-MDT0000
Source: /mnt/lustre
Target: /mnt/target
Statuslog: replicate.log
Changelog registration: cl1
Starting changelog record: 0
Errors: 0
lustre_rsync took 1 seconds
Changelog records consumed: 22
```

After the filesystem undergoes some changes, replicate the changes. Only the statuslog needs to be specified as it has all the parameters passed earlier:

```
# lustre_rsync --statuslog replicate.log --verbose
Replicating Lustre filesystem: lustre
MDT device: lustre-MDT0000
Source: /mnt/lustre
Target: /mnt/target
Statuslog: replicate.log
Changelog registration: cl1
Starting changelog record: 22
Errors: 0
lustre_rsync took 2 seconds
Changelog records consumed: 42
```

To replicate the lustre filesystem /mnt/lustre to /mnt/target1 and /mnt/target2:

```
# lustre_rsync --source=/mnt/lustre --target=/mnt/target1 --target=/mnt/target2 --mdt=lustre-MDT0000 --user=cl1 --statuslog replicate.log
```

# [AVAILABILITY](#AVAILABILITY)

The **lustre\_rsync** command is part of the [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7) filesystem package since release 1.7.0

# [SEE ALSO](#SEE_ALSO)

[**lfs**(1)](/man/enterprise-packages/lustre/lfs.1), [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7), [**lctl**(8)](/man/enterprise-packages/lustre/lctl.8)

2024-08-28 Lustre

---

Document: lustre_rsync(8) from lustre 2.17.59-r1 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
