athan_mj94
athan_mj94

Reputation:

In MySQL, what are the practices to backup databases?

I am using mysql

How often do you back up your database?

How do you normally backup your database?

Export all data into sql or cvs format and keep it in a folder??

Upvotes: 0

Views: 1331

Answers (6)

Hugues Van Landeghem
Hugues Van Landeghem

Reputation: 6808

You can also look hotbackup

Upvotes: 0

Jani Hartikainen
Jani Hartikainen

Reputation: 43243

Setting up a cronjob to run a script that does a mysqldump and stores the dump on a separate disk from the database itself (or a remote server) is a quite easy and efficient way to backup a database in my opinion. You could even have it dump every database with the --all-databases switch

If you have more than one MySQL server, you could also use replication

Frequency of backups depends on how much data you are willing to lose in case of a failure.

Upvotes: 2

funkydokta
funkydokta

Reputation: 96

1.If you want the easiest way to back-up the database then you can opt for phpMyadmin.

2.If you prefer command line then follow this way.

You would simply modify the path and filename to reflect the specifics of your new backup file, like so: C:\ mysql -uroot -p [DatabaseName] < C:/backups/[backUpDatabaseName.sql]

3.Mysql dump. C:\ mysqldump [myDatabaseName] > [ExportDatabaseName]

Upvotes: 0

Alan Haggai Alavi
Alan Haggai Alavi

Reputation: 74202

I use mysqldump:

mysqldump -uroot -p database_name > ~/backups/database_name-$(date +%s).sql

Upvotes: 0

ZA.
ZA.

Reputation: 10477

I backup databases daily, using 'mysqldump [options] db_name [tables]', and export all data into sql. Of course, this depend on the size of your databases.

Upvotes: 0

OrangeRind
OrangeRind

Reputation: 4818

How Often - Depends on the activity and traffic you have on your Database.

I use phpMyAdmin and then click on the export tab and export the database as .sql

you can reach phpmyadmin by either localhost/phpmyadmin if you are running xampp/wamp/lamp etc or you can click on the 'phpmyadmin' link in your webhost's cPanel if you are hosting your webstie online.

Upvotes: 0

Related Questions