Home >Backend Development >PHP Tutorial >How to back up MySQL database when there is only one server?
There is only one server, but I feel that it is not safe if the database is not backed up. So the question is, how to back up the database? ? ?
There is only one server, but I feel that it is not safe if the database is not backed up. So the question is, how to back up the database? ? ?
It is recommended that the poster write a shell script (the simple functions of the script include: export the database file into a tarball package, which can be named with a timestamp and then upload to the cloud disk or cloud storage using ftp or api. For example: Qiniu CDN provides free Space quota)
Then use Linux crontab to execute it regularly
How do you want to back up? If you don’t want to do it manually, just make a schedule
Can’t you just dump it and transfer it to another hard drive?
Plug in a mobile hard drive, map a drive letter (windows) or mount it (linux) and then back up to the mobile hard drive, it should be fine
It’s just one machine, so don’t count on that machine, dump it somewhere else
For a server, you can only consider backing up to other places. At the very least, add a hard drive and back up to a new hard drive.
http://jingyan.baidu.com/article/9f7e7ec0b0c1a36f28155432.html