Skip to content

-o flag issue: "Rake aborted! Don't know how to build task 'storage/restored_production.sqlite3'" #57

Description

@EdIzaguirre

I am getting a weird error when attempting to use the -o flag to restore a database to a particular path. The funny thing is that the restore appears to work, as I am able to use sqlite to successfully inspect the restored database. Anyone else getting this error? Is it impacting the backup? For reference I am using Kamal to deploy this Rails application to a Hetzner box, and using kamal shell to execute this command on the box.

Here is the error I am getting:

rails@5:/rails$ bundle exec rake litestream:restore -- --database=storage/production.sqlite3 -o storage/restored_production.sqlite3
rake aborted!
Don't know how to build task 'storage/restored_production.sqlite3' (See the list of available tasks with `rake --tasks`)
/usr/local/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
(See full trace by running task with --trace)
rails@5:/rails$ time=2024-12-23T20:57:09.931Z level=INFO msg="restoring snapshot" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=17 path=storage/restored_production.sqlite3.tmp
time=2024-12-23T20:57:09.973Z level=INFO msg="restoring wal files" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index_min=17 index_max=23
time=2024-12-23T20:57:10.054Z level=INFO msg="downloaded wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=23 elapsed=80.32204ms
time=2024-12-23T20:57:10.112Z level=INFO msg="downloaded wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=21 elapsed=138.936225ms
time=2024-12-23T20:57:10.118Z level=INFO msg="downloaded wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=17 elapsed=144.719188ms
time=2024-12-23T20:57:10.122Z level=INFO msg="applied wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=17 elapsed=4.669178ms
time=2024-12-23T20:57:10.131Z level=INFO msg="downloaded wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=20 elapsed=157.74297ms
time=2024-12-23T20:57:10.143Z level=INFO msg="downloaded wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=22 elapsed=169.495736ms
time=2024-12-23T20:57:10.151Z level=INFO msg="downloaded wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=19 elapsed=178.161513ms
time=2024-12-23T20:57:10.164Z level=INFO msg="downloaded wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=18 elapsed=191.638797ms
time=2024-12-23T20:57:10.169Z level=INFO msg="applied wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=18 elapsed=4.570974ms
time=2024-12-23T20:57:10.173Z level=INFO msg="applied wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=19 elapsed=3.384384ms
time=2024-12-23T20:57:10.176Z level=INFO msg="applied wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=20 elapsed=3.176626ms
time=2024-12-23T20:57:10.179Z level=INFO msg="applied wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=21 elapsed=3.491273ms
time=2024-12-23T20:57:10.183Z level=INFO msg="applied wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=22 elapsed=3.358186ms
time=2024-12-23T20:57:10.186Z level=INFO msg="applied wal" db=/rails/storage/production.sqlite3 replica=s3 generation=397293b925fc340a index=23 elapsed=3.105553ms
time=2024-12-23T20:57:10.186Z level=INFO msg="renaming database from temporary location" db=/rails/storage/production.sqlite3 replica=s3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions