Restore a database
In this example, to restore the sugarcrm database, execute mysql with
< as shown below. When you are restoring the dumpfilename.sql on a
remote database, make sure to create the sugarcrm database before you
can perform the restore.
# mysql -u root -ptmppassword
mysql> create database sugarcrm;
Query OK, 1 row affected (0.02 sec)
# mysql -u root -ptmppassword sugarcrm < /tmp/sugarcrm.sql
# mysql -u root -p[root_password] [database_name] < dumpfilename.sql
2. Backup a local database and restore to remote server using single command:
This is a sleek option, if you want to keep a
read-only database on the remote-server, which is a copy of the master
database on local-server. The example below will backup the sugarcrm
database on the local-server and restore it as sugarcrm1 database on the
remote-server. Please note that you should first create the sugarcrm1
database on the remote-server before executing the following command.
No comments:
Post a Comment