move
!move
Category: files
Move/rename a file on the target. Optionally backs up an existing destination first. Supports force-overwrite and post-move permission/ownership changes.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
src | path | yes | Remote source path (must exist). |
dest | path | yes | Remote destination path (parent dir must exist). |
mode | string | no | Octal permission string applied via chmod after the move. |
owner | string | no | Owner applied via chown after the move. |
group | string | no | Group applied via chown after the move. |
backup | bool | no | Copy the existing dest to a timestamped .backup before overwriting. |
force | bool | no | Overwrite an existing destination instead of reporting matched. |
Examples
- !move
src: /etc/app/app.conf.new
dest: /etc/app/app.conf
backup: true
mode: '0o640'