Skip to content

Question: How to restore SQLite to a different server with already existing SQLite #50

Description

@khaled-badenjki

If I'm on a server A with a rails app (running with Kamal 2) and using Litestream. Then i decided to move my app to a new server B

The data is already synced to my S3, when I moved to server B i tried to restore the database, but i got this error
error="cannot restore, output path already exists: /rails/storage/production.sqlite3"

I deleted the existing sqlite files and then I restored. It didn't throw errors, but I wasn't able to access the data. I felt that manually deleting the sqlite files is not a good action since there are already shm and wal files.

What should be the better way to handle my scenario?

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