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