stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
8.45k stars 749 forks source link

[Bug Report] backup and migration does not run relative to the db file #4915

Open feederbox826 opened 1 month ago

feederbox826 commented 1 month ago

Describe the bug The migration backup does not run relative to the db file, thus leading to issues with corruption on migration if it's on network storage

To Reproduce Steps to reproduce the behavior:

  1. Attempt to migrate with backup path or .config path backed by network storage
  2. "database is locked"

Expected behavior Backup is ran in the same directory as the db file

Screenshots Discord conversation start resolution

This also fails if generated is on network storage since the directory used will be network storage