arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to backup server your files from rescue mode (with MySQL Backup)
#6
(05-22-2020, 06:56 PM)Hidden Refuge Wrote: Good job but this is more of a tutorial for/about "how to mount partitions in Linux via command line" based on something you had to do to achieve a goal and what you did to get to it. There is nothing about doing the backup of the MySQL databases.

Well, you did mention the path where the database files are usually stored:
- /var/lib/mysql usually ALWAYs contains the database files (mind the "usually" since you can change the path but that path is the default).
- /etc/mysql (and similar) is just the folder with the MySQL database server configuration files and you won't find the databases there.

Backing up the database files by copying them from /var/lib/mysql is a bit of a last resort usually. Depending on how the database server was shutdown the files might be "unclean" as the shutdown was not clean/proper. If you import that into a new server you might run into some issues. Just need to be careful.

To backup it up properly you could rebind the local /var/lib/x to /var/lib/x on the drive you are trying to backup, then install MySQL and do a clean start of it to get the database checked and such and after that run a mysqldump. However that is more advanced than it sounds like for most users.

that what i use . i backup the /var/lib/mysql server when i backup or migrate the server . when i migrate from VPS 9 to VPS 5 i compress the /var/lib/mysql into zip and send the zip to the new vps and extract it there

for /etc/mysql i dont back that up and it work just fine

mysql isnt the only thing that i back up at that time . i backup the root directory because it contains all my https certificate . the nginx sites-enabled folder that contain all the sites setting , var www folder that contain all the sites files and finally the var lib mysql itself for the mysql database
Terminal
humanpuff69@FPAX:~$ Thanks To Shadow Hosting And Post4VPS for VPS 5


Messages In This Thread


person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting