vmrestore restores data from backups created by vmbackup.
v1.29.0 and newer versions must be used for working with the restored data.
Restore process can be interrupted at any time. It is automatically resumed from the inerruption point
vmrestore with the same args.
VictoriaMetrics must be stopped during the restore process.
vmrestore -src=gcs://<bucket>/<path/to/backup> -storageDataPath=<local/path/to/restore>
<bucket>is GCS bucket name.
<path/to/backup>is the path to backup made with vmbackup on GCS bucket.
<local/path/to/restore>is the path to folder where data will be restored. This folder must be passed to VictoriaMetrics in
-storageDataPathcommand-line flag after the restore process is complete.
-storageDataPath directory may contain old files. They will be susbstituted by the files from backup.
vmrestoreeats all the network bandwidth, then set
-maxBytesPerSecondto the desired value.
vmrestorehas been interrupted due to temporary error, then just restart it with the same args. It will resume the restore process.
vmrestore -help in order to see all the available options:
-concurrency int The number of concurrent workers. Higher concurrency may reduce restore duration (default 10) -configFilePath string Path to file with S3 configs. Configs are loaded from default location if not set. See https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html -configProfile string Profile name for S3 configs (default "default") -credsFilePath string Path to file with GCS or S3 credentials. Credentials are loaded from default locations if not set. See https://cloud.google.com/iam/docs/creating-managing-service-account-keys and https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html -customS3Endpoint string Custom S3 endpoint for use with S3-compatible storages (e.g. MinIO). S3 is used if not set -loggerLevel string Minimum level of errors to log. Possible values: INFO, ERROR, FATAL, PANIC (default "INFO") -maxBytesPerSecond int The maximum download speed. There is no limit if it is set to 0 -memory.allowedPercent float Allowed percent of system memory VictoriaMetrics caches may occupy (default 60) -src string Source path with backup on the remote storage. Example: gcs://bucket/path/to/backup/dir, s3://bucket/path/to/backup/dir or fs:///path/to/local/backup/dir -storageDataPath string Destination path where backup must be restored. VictoriaMetrics must be stopped when restoring from backup. -storageDataPath dir can be non-empty. In this case only missing data is downloaded from backup (default "victoria-metrics-data") -version Show VictoriaMetrics version
How to build from sources
It is recommended using binary releases - see
vmutils-* archives there.
- Install Go. The minimum supported version is Go 1.12.
make vmrestorefrom the root folder of the repository. It builds
vmrestorebinary and puts it into the
- Install docker.
make vmrestore-prodfrom the root folder of the repository. It builds
vmrestore-prodbinary and puts it into the
Building docker images
make package-vmrestore. It builds
victoriametrics/vmrestore:<PKG_TAG> docker image locally.
<PKG_TAG> is auto-generated image tag, which depends on source code in the repository.
<PKG_TAG> may be manually set via
PKG_TAG=foobar make package-vmrestore.