Backup and Restore SQLite DB to server?

Hi… Yes, it is largely the same procedure. The details depend on your exact filesystem layout, but it would go something like…

$ fly sftp shell
» put local.db /tmp/local.db
» ^C

$ fly ssh console
# cd /data/
# df -h .  # double-check that this is a persistent volume.
# mv -i -v server.db old.db
# mv -i -v /tmp/local.db server.db

(Here ^C is Ctrl+C, to exit the miniature, cameo shell.)

A persistent volume will be mounted on /data (typically) as opposed to /.

Once you’re satisfied that everything is working, you can remove old.db.

Unfortunately no search engine other than Marginalia is good at niche nerdknowledge anymore, in my experience.

You may have better luck with the forum’s own search box, actually. The following looks promising, for example, albeit a bit dated…

https://community.fly.io/t/unable-to-deploy-nextjs-app-with-sqlite-db/12176

3 Likes