r/mysql • u/Revolutionary_Use587 • Apr 12 '25
discussion MySQL Backup
Hey Friends,
I have a database (270 GB in size) in MySQL azure running as a paas service today I have to take backup up of that database and I have only 70 GB space available in my local windows computer, can anyone explain how I can take that backup?
1
Upvotes
3
u/johannes1234 Apr 12 '25
By getting space somewhere? Some cloud storage? Some hard drive from your local computer store?
If you manage that amount of data you should have capacity to make sure you won't lose it or your operation isn't sustainable.
2
u/mehargags Apr 12 '25
You can pipe the MysqlDump to a remote host or drive.
4
u/Aggressive_Ad_5454 Apr 12 '25
Order yourself three 1TiB external hard drives. Or even go to an office supply place and buy them. Short money. Can be put in a safe deposit box.
Don't forget to budget about $0.10 per GiB for egress bandwidth.
1
u/de_argh Apr 12 '25
not sure about that platform but xtrabackup and xbstream might work
1
u/alinroc Apr 12 '25
Microsoft already takes care of the backups for you as part of the service.
Please describe the problem you are trying to solve, not just "I want to take a backup." There may be a more appropriate solution.
3
u/well_shoothed Apr 13 '25
mydumperon the remote machine pulling the backup from the source to the destinationThere are a million scripts to do this out there. Not to mention GPT can easily script this.
If you can, do it over an SSH tunnel since it's a fuckton easier to do than setting up SSL on MySQL.
2
u/p_n_h Apr 12 '25
just use percona xtrabackup tool with stream backup option, it compresses on the fly
1
u/Jack-D-123 May 05 '25
I think you can backup your database using the method below:
mysqldump -h <server> -u <user> -p --databases your_db_name --tables table1 table2 > backup.sql
2. Use Azure Storage: If local space is tight, you can back up straight to Azure Blob Storage because this one is good idea.
3. Azure Backup: Check if Azure offers automatic backup for your MySQL database, because I think it might be an easier way to do it.
4. External Drive: If you have an external hard drive or network storage, you can back it up there instead.