chip
August 25, 2023, 10:46pm
1
Next cloud running as a docker on unraid.
DB is maria db.
I’m just in a test phase but trying to figure some things out before I go live. So one item is export db and import db.
So I export DB with Adminer.
I dropped the DB.
Then I try to import my import with adminer and I get.
DROP TABLE IF EXISTS `oc_accounts`
Error in query (1046): No database selected
5 queries executed OK. (0.033 s)
wwe
August 26, 2023, 7:47am
2
I’m sorry I don’t the point of you testing. If you are looking for backup you should do something like this
#backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
#restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
there is no good reason to export and import tables as often multiple tables relate to each other and you could introduce invalid state if you apply changes to only one of them.