I was told to ask this question here by John.
I was using Putty to try and dump a 5gb MYSQL database to keep as a backup. I tried using:
mysqldump -p -u username database > SQLbackup.sql.zip
It works but the data was corrupted. I guess removing the .zip at the end would fix this?
I had one other question. The database has a lot of IPs, is there a command I can use to dump all the IPs into a .txt file? I want to whitelist them on my Firewall.
Big MYSQL Database Dump
-
- New to forums
- Posts: 3
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Wed Aug 19, 2020 9:58 am
Re: Big MYSQL Database Dump
It would output to a .sql file, so you should keep the extension .sql. If you want that to be a .zip, you could either pipe it through the zip utility, or run zip on it afterward.
In terms of dumping IP addresses, you would want to do that with a script that queries your database and then prints them out, either to STDOUT or a file. You could use PHP, Python, or Perl to do this, for instance.
In terms of dumping IP addresses, you would want to do that with a script that queries your database and then prints them out, either to STDOUT or a file. You could use PHP, Python, or Perl to do this, for instance.