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.
35 *pvesr delete* `<id>` `[OPTIONS]`
37 Mark replication job for removal.
39 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
41 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
43 `--force` `<boolean>` ('default =' `0`)::
45 Will remove the jobconfig entry, but will not cleanup.
47 `--keep` `<boolean>` ('default =' `0`)::
49 Keep replicated data at target (do not remove).
51 *pvesr disable* `<id>`
53 Disable a replication job.
55 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
57 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
61 Enable a replication job.
63 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
65 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
67 *pvesr finalize-local-job* `<id> [<extra-args>]` `[OPTIONS]`
69 Finalize a replication job. This removes all replications snapshots with
70 timestamps different than <last_sync>.
72 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
74 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
76 `<extra-args>`: `<array>` ::
78 The list of volume IDs to consider.
80 `--last_sync` `<integer> (0 - N)` ::
82 Time (UNIX epoch) of last successful sync. If not specified, all replication snapshots gets removed.
84 *pvesr help* `[OPTIONS]`
86 Get help about specified command.
88 `--extra-args` `<array>` ::
90 Shows help for a specific command
92 `--verbose` `<boolean>` ::
94 Verbose output format.
98 List replication jobs.
100 *pvesr prepare-local-job* `<id> [<extra-args>]` `[OPTIONS]`
102 Prepare for starting a replication job. This is called on the target node
103 before replication starts. This call is for internal use, and return a JSON
104 object on stdout. The method first test if VM <vmid> reside on the local
105 node. If so, stop immediately. After that the method scans all volume IDs
106 for snapshots, and removes all replications snapshots with timestamps
107 different than <last_sync>. It also removes any unused volumes. Returns a
108 hash with boolean markers for all volumes with existing replication
111 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
113 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
115 `<extra-args>`: `<array>` ::
117 The list of volume IDs to consider.
119 `--force` `<boolean>` ('default =' `0`)::
121 Allow to remove all existion volumes (empty volume list).
123 `--last_sync` `<integer> (0 - N)` ::
125 Time (UNIX epoch) of last successful sync. If not specified, all replication snapshots get removed.
127 `--parent_snapname` `<string>` ::
129 The name of the snapshot.
131 `--scan` `<string>` ::
133 List of storage IDs to scan for stale volumes.
137 Read replication job configuration.
139 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
141 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
143 *pvesr run* `[OPTIONS]`
145 This method is called by the systemd-timer and executes all (or a specific)
148 `--id` `[1-9][0-9]{2,8}-\d{1,9}` ::
150 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
152 `--mail` `<boolean>` ('default =' `0`)::
154 Send an email notification in case of a failure.
156 `--verbose` `<boolean>` ('default =' `0`)::
158 Print more verbose logs to stdout.
160 *pvesr schedule-now* `<id>`
162 Schedule replication job to start as soon as possible.
164 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
166 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
168 *pvesr set-state* `<vmid> <state>`
170 Set the job replication state on migration. This call is for internal use.
171 It will accept the job state as ja JSON obj.
173 `<vmid>`: `<integer> (1 - N)` ::
175 The (unique) ID of the VM.
177 `<state>`: `<string>` ::
179 Job state as JSON decoded string.
181 *pvesr status* `[OPTIONS]`
183 List status of all replication jobs on this node.
185 `--guest` `<integer> (1 - N)` ::
187 Only list replication jobs for this guest.
189 *pvesr update* `<id>` `[OPTIONS]`
191 Update replication job configuration.
193 `<id>`: `[1-9][0-9]{2,8}-\d{1,9}` ::
195 Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
197 `--comment` `<string>` ::
201 `--delete` `<string>` ::
203 A list of settings you want to delete.
205 `--digest` `<string>` ::
207 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
209 `--disable` `<boolean>` ::
211 Flag to disable/deactivate the entry.
213 `--rate` `<number> (1 - N)` ::
215 Rate limit in mbps (megabytes per second) as floating point number.
217 `--remove_job` `<full | local>` ::
219 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.
221 `--schedule` `<string>` ('default =' `*/15`)::
223 Storage replication schedule. The format is a subset of `systemd` calender events.