1 *pvesr* `<COMMAND> [ARGS] [OPTIONS]`
3 *pvesr create-local-job* `<id> <target>` `[OPTIONS]`
5 Create a new replication job
7 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
9 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
11 `<target>`: `<string>` ::
15 `-comment` `<string>` ::
19 `-disable` `<boolean>` ::
21 Flag to disable/deactivate the entry.
23 `-rate` `<number> (1 - N)` ::
25 Rate limit in mbps (megabytes per second) as floating point number.
27 `-remove_job` `<full | local>` ::
29 Mark the replication job for removal. The job will remove all local replication snapshots. When set to 'full', it also tries to remove replicated volumes on the target. The job then removes itself from the configuration file.
31 `-schedule` `<string>` ('default =' `*/15`)::
33 Storage replication schedule. The format is a subset of `systemd` calender events.
37 *pvesr delete* `<id>` `[OPTIONS]`
39 Mark replication job for removal.
41 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
43 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
45 `-force` `<boolean>` ('default =' `0`)::
47 Will remove the jobconfig entry, but will not cleanup.
49 `-keep` `<boolean>` ('default =' `0`)::
51 Keep replicated data at target (do not remove).
56 *pvesr disable* `<id>`
58 Disable a replication job.
60 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
62 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
68 Enable a replication job.
70 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
72 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
76 *pvesr finalize-local-job* `<id> [<extra-args>]` `[OPTIONS]`
78 Finalize a replication job. This removes all replications snapshots with
79 timestamps different than <last_sync>.
81 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
83 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
85 `<extra-args>`: `<array>` ::
87 The list of volume IDs to consider.
89 `-last_sync` `<integer> (0 - N)` ::
91 Time (UNIX epoch) of last successful sync. If not specified, all replication snapshots gets removed.
96 *pvesr help* `[<cmd>]` `[OPTIONS]`
98 Get help about specified command.
100 `<cmd>`: `<string>` ::
104 `-verbose` `<boolean>` ::
106 Verbose output format.
113 List replication jobs.
118 *pvesr prepare-local-job* `<id> [<extra-args>]` `[OPTIONS]`
120 Prepare for starting a replication job. This is called on the target node
121 before replication starts. This call is for internal use, and return a JSON
122 object on stdout. The method first test if VM <vmid> reside on the local
123 node. If so, stop immediately. After that the method scans all volume IDs
124 for snapshots, and removes all replications snapshots with timestamps
125 different than <last_sync>. It also removes any unused volumes. Returns a
126 hash with boolean markers for all volumes with existing replication
129 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
131 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
133 `<extra-args>`: `<array>` ::
135 The list of volume IDs to consider.
137 `-force` `<boolean>` ('default =' `0`)::
139 Allow to remove all existion volumes (empty volume list).
141 `-last_sync` `<integer> (0 - N)` ::
143 Time (UNIX epoch) of last successful sync. If not specified, all replication snapshots get removed.
145 `-parent_snapname` `<string>` ::
147 The name of the snapshot.
149 `-scan` `<string>` ::
151 List of storage IDs to scan for stale volumes.
158 Read replication job configuration.
160 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
162 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
167 *pvesr run* `[OPTIONS]`
169 This method is called by the systemd-timer and executes all (or a specific)
172 `-id` `[1-9][0-9]{2,8}-\d{1,9}` ::
174 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
176 `-verbose` `<boolean>` ('default =' `0`)::
178 Print more verbose logs to stdout.
183 *pvesr schedule-now* `<id>`
185 Schedule replication job to start as soon as possible.
187 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
189 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
194 *pvesr set-state* `<vmid> <state>`
196 Set the job replication state on migration. This call is for internal use.
197 It will accept the job state as ja JSON obj.
199 `<vmid>`: `<integer> (1 - N)` ::
201 The (unique) ID of the VM.
203 `<state>`: `<string>` ::
205 Job state as JSON decoded string.
210 *pvesr status* `[OPTIONS]`
212 List status of all replication jobs on this node.
214 `-guest` `<integer> (1 - N)` ::
216 Only list replication jobs for this guest.
221 *pvesr update* `<id>` `[OPTIONS]`
223 Update replication job configuration.
225 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
227 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
229 `-comment` `<string>` ::
233 `-delete` `<string>` ::
235 A list of settings you want to delete.
237 `-digest` `<string>` ::
239 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
241 `-disable` `<boolean>` ::
243 Flag to disable/deactivate the entry.
245 `-rate` `<number> (1 - N)` ::
247 Rate limit in mbps (megabytes per second) as floating point number.
249 `-remove_job` `<full | local>` ::
251 Mark the replication job for removal. The job will remove all local replication snapshots. When set to 'full', it also tries to remove replicated volumes on the target. The job then removes itself from the configuration file.
253 `-schedule` `<string>` ('default =' `*/15`)::
255 Storage replication schedule. The format is a subset of `systemd` calender events.