Chyba při stahování záloh NAS pomocí vpsfreectl

Ahoj, rád bych automaticky stahoval snapshoty NAS na lokální ZFS.

Snapshoty vytvářím pomocí skriptu z wiki, ten funguje bezvadně.

Problém nastává u stažení přes vpsfreectl. Příkaz vpsfreectl backup dataset XXX vpsfree/dataset/XXX končí chybou:

Will download 1 snapshots:
  @2025-10-30T09:50:20

Performing a full receive of @2025-10-30T09:50:20 to vpsfree/dataset/XXX/0
Reusing existing SnapshotDownload (id=XXX)
Downloading 0.5 GB: [==============================================================================================] waiting 1
The sha256sum does not match, retry the download
/home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsadmin-client-4.1.0/lib/vpsadmin/cli/commands/snapshot_send.rb:90:in `initialize': not in gzip format (Zlib::GzipFile::Error)
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsadmin-client-4.1.0/lib/vpsadmin/cli/commands/snapshot_send.rb:90:in `new'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsadmin-client-4.1.0/lib/vpsadmin/cli/commands/snapshot_send.rb:90:in `do_exec'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsadmin-client-4.1.0/lib/vpsadmin/cli/commands/backup_dataset.rb:254:in `block in transfer'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsadmin-client-4.1.0/lib/vpsadmin/cli/commands/backup_dataset.rb:445:in `block in run_piped'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsadmin-client-4.1.0/lib/vpsadmin/cli/commands/backup_dataset.rb:442:in `fork'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsadmin-client-4.1.0/lib/vpsadmin/cli/commands/backup_dataset.rb:442:in `run_piped'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsadmin-client-4.1.0/lib/vpsadmin/cli/commands/backup_dataset.rb:253:in `transfer'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsadmin-client-4.1.0/lib/vpsadmin/cli/commands/backup_dataset.rb:233:in `exec'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/haveapi-client-0.26.2/lib/haveapi/cli/cli.rb:78:in `initialize'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/haveapi-client-0.26.2/lib/haveapi/cli/cli.rb:14:in `new'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/haveapi-client-0.26.2/lib/haveapi/cli/cli.rb:14:in `run'
	from /home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsfree-client-0.19.0/bin/vpsfreectl:4:in `<top (required)>'
	from /home/adam/.rbenv/versions/3.3.9/bin/vpsfreectl:25:in `load'
	from /home/adam/.rbenv/versions/3.3.9/bin/vpsfreectl:25:in `<main>'
cannot receive: failed to read from stream
Receive failed

Stejnou chybu dostanu i pokud snapshot nevytvořím skriptem ale ručně z administrace.

Pokud zkusím přepínač --safe-download, dostanu chybu:

The sha256sum does not match, retry the download

S přepínači --safe-download --no-checksum je pak chyba:

gzip: .snapshot_XXXXXXX.dat.gz: unexpected end of file
cannot receive: failed to read from stream
Receive failed

Stahování záloh VPS pomocí vpsfreectl backup vps funguje bez problémů.

Používám ruby 3.3.9 s jednoduchým Gemfile:

source 'https://rubygems.org'

gem 'vpsfree-client'

Gemfile.lock je:

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (8.0.3)
      base64
      benchmark (>= 0.3)
      bigdecimal
      concurrent-ruby (~> 1.0, >= 1.3.1)
      connection_pool (>= 2.2.5)
      drb
      i18n (>= 1.6, < 2)
      logger (>= 1.4.2)
      minitest (>= 5.1)
      securerandom (>= 0.3)
      tzinfo (~> 2.0, >= 2.0.5)
      uri (>= 0.13.1)
    base64 (0.3.0)
    benchmark (0.4.1)
    bigdecimal (3.3.1)
    concurrent-ruby (1.3.5)
    connection_pool (2.5.4)
    curses (1.5.3)
    domain_name (0.6.20240107)
    drb (2.2.3)
    haveapi-client (0.26.2)
      activesupport (>= 7.0)
      highline (~> 3.1)
      json
      require_all (~> 2.0.0)
      rest-client (~> 2.1.0)
      ruby-progressbar (~> 1.13.0)
    highline (3.1.2)
      reline
    http-accept (1.7.0)
    http-cookie (1.1.0)
      domain_name (~> 0.5)
    i18n (1.14.7)
      concurrent-ruby (~> 1.0)
    io-console (0.8.1)
    json (2.15.1)
    logger (1.7.0)
    mime-types (3.7.0)
      logger
      mime-types-data (~> 3.2025, >= 3.2025.0507)
    mime-types-data (3.2025.0924)
    minitest (5.26.0)
    netrc (0.11.0)
    reline (0.6.2)
      io-console (~> 0.5)
    require_all (2.0.0)
    rest-client (2.1.0)
      http-accept (>= 1.7.0, < 2.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 4.0)
      netrc (~> 0.8)
    ruby-progressbar (1.13.0)
    securerandom (0.4.1)
    tzinfo (2.0.6)
      concurrent-ruby (~> 1.0)
    uri (1.0.4)
    vpsadmin-client (4.1.0)
      base64
      curses
      haveapi-client (~> 0.26.0)
      json
    vpsfree-client (0.19.0)
      vpsadmin-client (~> 4.0)

PLATFORMS
  aarch64-linux
  ruby

DEPENDENCIES
  vpsfree-client

BUNDLED WITH
   2.5.22

Poradíte mi prosím, co dělám špatně? V minulosti mi stahování záloh NAS fungovalo, pokazilo se někdy kolem 13. října. Zkoušel jsem od té doby různé verze ruby a aktualizovat knihovny, bohužel bez úspěchu.

Ještě doplním, že pokud se pokusím stáhnout konkrétní snapshot NAS pomocí vpsfreectl snapshot download, dostanu chybu

/home/adam/.rbenv/versions/3.3.9/lib/ruby/gems/3.3.0/gems/vpsadmin-client-4.1.0/lib/vpsadmin/cli/commands/base_download.rb:15:in `block in find_or_create_dl': SnapshotDownload id=XXX is in unusable format 'stream' (needs 'archive') (RuntimeError)

Stažení snapshotu VPS funguje bez probému.

To nebyla chyba u tebe, ale u nás. Při přesunu NASu na backuper2.prg se zapomnělo nastavit sharenfs, takže se http proxy nedostala k datům a dávalo ti to 404, resp. odpověď neodpovídala checksumu. Už by to mělo jít.

Wow, moc děkuji, už to funguje :slight_smile:

1 Like

Super, díky za upozornění :slight_smile: