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.



29 Replies
you have any errors?
or the backups are being succesfull but no data?
Backups are being successful but no data.
I am not getting any errors
Ok let me check
Thanks, I tried with AWS and R2 storage but the results are same
Thanks for the context, let me check!!
give me a few minutes I'm with another bug 😅
I tested and is working for me
the first backup was with the db empty

and the second one after i created a table and registers

more data, more space

I created another database with the same username and database name as you have and is the same

is working fine
I don’t know why it’s not working on my end 😔, do you think I did something wrong here?
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;

can you create a registers in that table?
I have created new database and inserted new tables and data but no luck 🙂




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.
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.
here is the screenshot @Siumauricio
I will try to replicate this, but for me is working
Thanks.
I recently tested this and is working for me

Let me test it.
Not working for MongoDB, see images
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.
Hi @Piyush Dixit how did you configure to backup only one database?
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
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
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 ...
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 ...