-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mariadb/Mysql restore not working? #21
Comments
Hi @MagicLegend I tried out your setup on my machine, and it seemed to work. Only difference was that I didn't set the I'm just wildly guessing, but my theory is that your dump file has some statements that conflict with the dump file generated by It'd be helpful if you:
To your note on defining a password, we support that for Postgres, so it's just a matter of doing the same for Mariadb. I'll make an issue on it. Thanks! |
Hi @kklin Sorry getting back at you this late. The version: '3'
services:
mariadb:
image: mariadb:latest
ports:
- "3306:3306"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/sql_dump_file.sql
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_DATABASE=testdb
- MYSQL_ALLOW_EMPTY_PASSWORD=true create table if not exists Genre
(
name varchar(255) not null
primary key,
createdAt datetime null,
updatedAt datetime null
); I just wanted it to contain something as a poc. After initial
After first snapshot taken.
Executing SQL: INSERT INTO testdb.Genre (name, createdAt, updatedAt) VALUES ('Genre1', '2020-05-06 17:55:20', '2020-05-06 17:55:21');
INSERT INTO testdb.Genre (name, createdAt, updatedAt) VALUES ('Genre2', null, null); Taking second snapshot (
Diff view in Rolling back to initial state After rolling back.
Given the logging, I presume I assumed the massive amounts of sha-hash-containers had something to do with it breaking; but I didn't read the log of the failed container. My bad; since I could have figured out what was going wrong on my own then :-). However; I am still curious where all those extra containers come from, and why they are not cleaned up properly. This is adding a lot of unreadable clutter to the docker commands (and confusing novices like me :D)... I can't seem to re-create my own error now. That's always fun. However, I am quite certain it would have had something to do with the failing of the |
Thanks for the info. That's right, That I agree, there seems to be more dksnap containers than I'd expect. docker-compose may be restarting them automatically after they crash |
Hi,
I was looking for a tool that could do exactly this, and I was really happy when I found it. This is functionality my expensive Datagrip totally lacks, but is super handy. However; there seems to be a bug when it comes to restoring a snapshot. The tool reports a success, but no container is actually started. I've tried replacing and starting from a snapshot; both don't work. When replacing, the old container is shut down, but no new container is spun up. In the docker logs (
sudo journalctl -fu docker.service
) I only see the following line pop up every time I try to start from a snapshot:I am using the following docker-compose:
EDIT:
In my vscode-docker I see a bunch of new containers have been created, three of which had the names of the snapshots I took. The others were just hashes. I guess dksnap did something; but not what I would expect :)
Also, on another note; it is not possible to define a root password in this tool. This should totally be the case; since it would provide a little extra security. It should at least prompt the user when passwordless auth fails to let me enter the password. I have never worked with go before; so I'm afraid I won't be too much of an help in fixing this issue.
Thank you for your time.
The text was updated successfully, but these errors were encountered: