Sample Header Ad - 728x90

What is the proper way to back up MySQL database with rsnapshot?

7 votes
1 answer
5510 views
I want to back up my website that contains both user-uploaded images and data stored in MySQL databases such that they are always consistent with each other at any particular point of time. While searching for solutions, I found this application, rsnapshot, which might be appropriate for the task. Having gone through a few blogs on the internet, I realize that this is actually done with a backup_script using mysqldump method: backup_script ssh root@example.com "mysqldump -A > /var/db/dump/mysql.sql" unused2 backup root@example.com:/var/db/dump/ example.com/ What I am not sure is whether there is a necessity to flush all tables with read lock before performing the dump in the script to ensure consistency of the database. If so, how should this be incorporated? If no, why is it not necessary?
Asked by Question Overflow (1009 rep)
Jan 31, 2013, 07:01 AM
Last activity: Mar 31, 2024, 12:34 AM