GithubHelp home page GithubHelp logo

Comments (7)

CaptSpify avatar CaptSpify commented on September 21, 2024

I just tried with the latest version, and I can't tell if it creates the snapshot directory or not, because it deletes it before it says that it cannot find it:

$ vmbackup-prod -storageDataPath=/var/victoriametrics -snapshot.createURL=http://victoriametrics.somehost.com:8428/snapshot/create -dst=fs:///mnt/backup/vmetrics
2024-05-09T17:22:20.123Z        info    VictoriaMetrics/lib/logger/flag.go:12   build version: vmbackup-20240425-145523-tags-v1.101.0-0-g5334f0c2c
2024-05-09T17:22:20.123Z        info    VictoriaMetrics/lib/logger/flag.go:13   command-line flags
2024-05-09T17:22:20.123Z        info    VictoriaMetrics/lib/logger/flag.go:20     -dst="fs:///mnt/backup/vmetrics"
2024-05-09T17:22:20.123Z        info    VictoriaMetrics/lib/logger/flag.go:20     -snapshot.createURL="secret"
2024-05-09T17:22:20.123Z        info    VictoriaMetrics/lib/logger/flag.go:20     -storageDataPath="/var/victoriametrics"
2024-05-09T17:22:20.124Z        info    VictoriaMetrics/app/vmbackup/main.go:67 Snapshot create url http://victoriametrics.somehost.com:8428/snapshot/create
2024-05-09T17:22:20.124Z        info    VictoriaMetrics/app/vmbackup/main.go:78 Snapshot delete url http://victoriametrics.somehost.com:8428/snapshot/delete
2024-05-09T17:22:20.124Z        info    VictoriaMetrics/lib/snapshot/snapshot.go:32     Creating snapshot
2024-05-09T17:22:20.520Z        info    VictoriaMetrics/lib/snapshot/snapshot.go:64     Snapshot 20240509172220-17CDDE9977A3CE4B created
2024-05-09T17:22:20.521Z        info    VictoriaMetrics/lib/snapshot/snapshot.go:75     Deleting snapshot 20240509172220-17CDDE9977A3CE4B
2024-05-09T17:22:20.521Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:119        starting server at http://127.0.0.1:8420/
2024-05-09T17:22:20.521Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:120        pprof handlers are exposed at http://127.0.0.1:8420/debug/pprof/
2024-05-09T17:22:20.555Z        info    VictoriaMetrics/lib/snapshot/snapshot.go:108    Snapshot 20240509172220-17CDDE9977A3CE4B deleted
2024-05-09T17:22:20.555Z        fatal   VictoriaMetrics/app/vmbackup/main.go:104        cannot create backup: cannot open snapshot at "/var/victoriametrics/snapshots/20240509172220-17CDDE9977A3CE4B": open /var/victoriametrics/snapshots/20240509172220-17CDDE9977A3CE4B: no such file or directory

$ vmbackup-prod -version
vmbackup-20240425-145523-tags-v1.101.0-0-g5334f0c2c

from victoriametrics.

zekker6 avatar zekker6 commented on September 21, 2024

@CaptSpify Could you please clarify whether -storageDataPath/var/victoriametrics is pointing to the same file system when running both VictoriaMetrics and vmbackup?

from victoriametrics.

CaptSpify avatar CaptSpify commented on September 21, 2024

Yup:

1 root      3h05 /victoria-metrics-prod -loggerTimezone=America/Los_Angeles -storageDataPath=/var/victoriametrics/

from victoriametrics.

zekker6 avatar zekker6 commented on September 21, 2024

@CaptSpify Are both vmbackup and victoria-metrics-prod running on the same machine?
I'm asking because -snapshot.createURL=http://victoriametrics.somehost.com:8428/snapshot/create flag value looks like a URL which is pointing to another machine. If vmbackup is running on a separate host that would explain why it cant open snapshot at the given path - because is stored on a machine where victoria-metrics-prod is running.

from victoriametrics.

CaptSpify avatar CaptSpify commented on September 21, 2024

Ah, that's it then. vmbackup won't run in the victoriametrics docker container, so I set it up on another host. If it only runs locally, then I'm confused why using a url to create the snapshot is needed?

from victoriametrics.

zekker6 avatar zekker6 commented on September 21, 2024

It is needed since it is possible to change a listening host and port by using -httpListenAddr and to enforce an authentication to create snapshot by using -snapshotAuthKey command-line flags at VictoriaMetrics single-node side.
If any of these options is used it is possible to change -snapshot.createURL to point to a correct address and use valid credentials.

from victoriametrics.

CaptSpify avatar CaptSpify commented on September 21, 2024

Ah gotcha. I just moved to an export/import model for backups instead of using vmbackup/vmrestore, so this is good to close. Thanks

from victoriametrics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.