Jump to content

backup database


code_lotus

Recommended Posts

Are you using MS SQL, MySQL, PostgreSQL, Oracle, Access, or something else?For MS SQL:http://msdn.microsoft.com/library/default....migwiz_0z50.aspFor MySQL (ver 5.0):http://dev.mysql.com/doc/refman/5.0/en/backup.htmlFor MS Access:Just copy the database file and rename itFor PostegreSQL:???For Oracle:http://www.idevelopment.info/data/Oracle/D...y/BandR_2.shtmlMost SQL servers out there have an methods available to make this a quick and painless process. Many of them through export utilities, but it will vary with each company. But this should be enough information to get you started at least.

Link to comment
Share on other sites

Are you using MS SQL, MySQL, PostgreSQL, Oracle, Access, or something else?For MS SQL:http://msdn.microsoft.com/library/default....migwiz_0z50.aspFor MySQL (ver 5.0):http://dev.mysql.com/doc/refman/5.0/en/backup.html...
i have already visited the site that u gave me.i found this syntax :)shell> mysqldump --tab=/path/to/some/dir --opt db_namecan we use this syntax in MySql Query Browser? or we can use it only in command prompt?have u ever used 'backup' function from MySql Query Administrator ? do u have any sugestion so i can create a backup,the result of which is the same as the results of 'backup' function from MySql Query Administrator :( actually i'm developing an application for my final exam. in that application, i use java n mySql for the database.and then i want to create a button that if users click the button, it will automatically create a backup for my database.so that's why i need to know the sql syntax for backing up the database. :Dor do u have a better idea ? thanx for ur reply. i hope u understand my question :) (if u dont understand, plz let me know)
Link to comment
Share on other sites

Yes I understand your question perfectly, and unfortuantely I do not have a specific answer for you. I have not actually done a backup on MySQL, but from what I can tell it must be run from the command prompt. If you are only backing up the tables then you can do that using only SQL syntax. You could however do a full database back up by using the following command:

BACKUP TABLE tbl_name [, tbl_name] ... TO '/path/to/backup/directory'

on each table. Now this will not copy the database, but if you have all the contents of the database, then you should be fine.Hope that helps.By the way the information for the above query is:http://dev.mysql.com/doc/refman/5.0/en/backup-table.html

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...