Database recovery #6654
-
Hello, I was repairing the mail server and restarted the editor with the command
after which I was pleased with the start screen and realized that my entire database had been deleted, can I somehow restore it?
Is data stored in containers or in separate volumes? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 5 replies
-
I found a volume, which is probably my old database, because... it is the largest in size, can I probably remount it?
|
Beta Was this translation helpful? Give feedback.
-
Uh oh. Are you not backing up your database and environment file? Also, if Redash is installed in the standard |
Beta Was this translation helpful? Give feedback.
-
How can I remount a volume from |
Beta Was this translation helpful? Give feedback.
-
That's a good question. I've never needed to try mounting stuff out of an old docker volume like that before. First things first though, make a complete copy of that old volume somehow, just in case whatever is tried next goes badly. 😄 |
Beta Was this translation helpful? Give feedback.
-
What I'd probably do is this:
In theory, that should all work ok and be the manual equivalent of restoring the database. If that works, then starting Redash should have all of your stuff in it... 😅 Er... good luck? 😁 |
Beta Was this translation helpful? Give feedback.
-
Oh, be aware that the environment file (should) contain a value in it for encrypting some of the important data in the database (an encryption key). That's why it's important to back up the environment file. If you correctly restore the database, but are using an environment file with a mismatching encryption key... then the Redash database still won't be loaded fully. It'll only load the unencrypted parts of it. |
Beta Was this translation helpful? Give feedback.
What I'd probably do is this:
redash.env
,redash.env_back
)docker compose run server create_db
<-- this is just to create the directory and initial filesdocker compose down
)