mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
Add --delete option to rsync command, so it removes non-existing files from the destination
- The --delete option is needed to be passed to rsync during backups, Since otherwise the backup may contain superfluous files after the second run of rsync, because these files can be already removed at the source because of background merge - the --delete option is needed when restoring from backup in order to remove superfluous files from the destination directory. Otherwise these files may lead to inconsistent data at VictoriaLogs.
This commit is contained in:
parent
cc908122bd
commit
0f2233aef3
1 changed files with 2 additions and 2 deletions
|
@ -197,7 +197,7 @@ Therefore, for a complete data **backup**, you need to run the `rsync` command *
|
|||
|
||||
```sh
|
||||
# example of rsync to remote host
|
||||
rsync -avh --progress <path-to-victorialogs-data> <username>@<host>:<path-to-victorialogs-backup>
|
||||
rsync -avh --progress --delete <path-to-victorialogs-data> <username>@<host>:<path-to-victorialogs-backup>
|
||||
```
|
||||
|
||||
The first `rsync` will sync the majority of the data, which can be time-consuming.
|
||||
|
@ -227,7 +227,7 @@ VictoriaLogs will automatically load this data upon startup.
|
|||
|
||||
```sh
|
||||
# example of rsync from remote backup to local
|
||||
rsync -avh --progress <username>@<host>:<path-to-victorialogs-backup> <path-to-victorialogs-data>
|
||||
rsync -avh --progress --delete <username>@<host>:<path-to-victorialogs-backup> <path-to-victorialogs-data>
|
||||
```
|
||||
|
||||
It is also possible to use **the disk snapshot** in order to perform a backup. This feature could be provided by your operating system,
|
||||
|
|
Loading…
Reference in a new issue