D
Dokploy•7mo ago
Arif

Backup file is empty of MySQL database

I am getting an empty backup file on my s3 bucket, tried with multiple databases also the redeployed multiple time to test I am using mysql database template and version 8. The database contains hundreds of tables and rows but the backup file is only 20b without any sql queries on it.
No description
No description
No description
29 Replies
Siumauricio
Siumauricio•7mo ago
you have any errors? or the backups are being succesfull but no data?
Arif
ArifOP•7mo ago
Backups are being successful but no data. I am not getting any errors
Siumauricio
Siumauricio•7mo ago
Ok let me check
Arif
ArifOP•7mo ago
Thanks, I tried with AWS and R2 storage but the results are same
Siumauricio
Siumauricio•7mo ago
Thanks for the context, let me check!! give me a few minutes I'm with another bug 😅 I tested and is working for me
Siumauricio
Siumauricio•7mo ago
the first backup was with the db empty
No description
Siumauricio
Siumauricio•7mo ago
and the second one after i created a table and registers
No description
Siumauricio
Siumauricio•7mo ago
more data, more space
No description
Siumauricio
Siumauricio•7mo ago
I created another database with the same username and database name as you have and is the same
No description
Siumauricio
Siumauricio•7mo ago
is working fine
Arif
ArifOP•7mo ago
I don’t know why it’s not working on my end 😔, do you think I did something wrong here?
Siumauricio
Siumauricio•7mo ago
can you enter to the terminal of the container? type this in the terminal mysql -u jhjhfj273msjhuy2 -p then it will ask the password type the password you have in your db then type this USE aah8713jndasjuy; then type this SHOW TABLES;
Arif
ArifOP•7mo ago
No description
Siumauricio
Siumauricio•7mo ago
can you create a registers in that table?
Arif
ArifOP•7mo ago
I have created new database and inserted new tables and data but no luck 🙂
No description
No description
No description
No description
Arif
ArifOP•7mo ago
Update: I couldn't fix the issue so, ended up with the default backup system of Dokploy and, made a custom backup features on my website.
Piyush Dixit
Piyush Dixit•7mo ago
I am also getting a mongoDB empty backup, My mongoDB size is almost 100 MB, My S3 service provider, And connection succesful and manual backup still zero size. https://c2.synology.com/en-global/backup/business/overview
Synology C2 Backup for Business | Protect business data with cloud ...
C2 Backup for Business keeps all your business data across physical devices and cloud services safe and sound. Back up data from PC, Mac, and Microsoft 365 effortlessly with C2 Backup.
Piyush Dixit
Piyush Dixit•7mo ago
here is the screenshot @Siumauricio
No description
Siumauricio
Siumauricio•7mo ago
I will try to replicate this, but for me is working
Piyush Dixit
Piyush Dixit•7mo ago
Thanks.
Siumauricio
Siumauricio•7mo ago
I recently tested this and is working for me
No description
Piyush Dixit
Piyush Dixit•7mo ago
Let me test it.
Piyush Dixit
Piyush Dixit•7mo ago
Not working for MongoDB, see images
No description
No description
Piyush Dixit
Piyush Dixit•7mo ago
using "Run Manual Backup" to test, and Dokploy Version: v0.11.0 @Siumauricio Update: Backup only one database, No full mongoDB which includes all Databases. mongodump can be used for full mongoDB backup. Can you please add this option. Thanks.
Arif
ArifOP•7mo ago
Hi @Piyush Dixit how did you configure to backup only one database?
Piyush Dixit
Piyush Dixit•7mo ago
As per Dokploy backup configuration, We can only backup one database with one cron job, Which S3 bucket are you using? So i can help
Gity37
Gity37•3mo ago
I have the same issue where i try to backup my mysql database to S3 and generates 0 bytes sql files. In my case i have db service for DEV and other for PROD, same configuration, same databases in each one. DEV backups work perfectly and PROD doesn't. Another weird thing is if i try to connect to PROD mysql (mysql -u root -p) if i copy the password from the app button and paste it, it doesn't work. I have to write it manually. No special characters in the password and again only happens in PROD. No idea if this is related but I hope that my experience help to find the root cause of the issue. @Gity37
Gity37
Gity37•3mo ago
Nevermind I found the bug in the code and I opened a PR: https://github.com/Dokploy/dokploy/pull/1431
GitHub
Database empty backups fix by Gity37 · Pull Request #1431 · Dokploy...
All started when I tried to setup a mysql database backup to a S3 destination. I ran the manual backup and what I found on S3 was an empty sql file even though Dokploy said that it was a succesful ...
Gity37
Gity37•3mo ago
I left a comment in this issue where I explain how to fix the problem in already created database services: https://github.com/Dokploy/dokploy/issues/1382#issuecomment-2708500510
GitHub
Automated Postgres Backup Always Empty · Issue #1382 · Dokploy/dokp...
To Reproduce Deploy the Postgres Template with automated backups enabled. Configure S3 (DigitalOcean Buckets) as the backup storage. Ensure that the database has live data. Wait for the backup job ...

Did you find this page helpful?