Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

how to save db in .bak

Links for php scripts

Moderators: macek, egami, gesf

how to save db in .bak

Postby anuradha » Thu Feb 09, 2012 12:29 am

Hi All,
I am a php developer. Please help me out in coding with how a database table will convert to .bkp file after some while , so that more n more data can be saved in a table in compreesed form. Please help,Please help,Please help,Please help,Please help,Please help.


:help: :help: :help: :help: :help: :help: :help: :help: :help: :help: :help: :help: :help: :help: :help:
anuradha
New php-forum User
New php-forum User
 
Posts: 10
Joined: Thu Dec 29, 2011 10:25 pm

Re: how to save db in .bak

Postby Antrikssh » Wed May 16, 2012 6:30 am

Hello,

If you are using mysql db then you can use the following command by which you can easily make a back-up file for your database. The command are mention bellow :-
[root]# mysqldump -u [username] -p [password] [db_name] > [backfile.sql]

now you can easily replace the variable with in the bracket [] by the required information. By this you will easily make your backup file. If you want to take backup of some specified file then you will use the following command.

[root]# mysqldump --add-drop-table -u [username] -p [password] [db_name] [tablename1] [tablename2] > [backfile.sql]

Regard,
Antrikssh.... :)
Antrikssh
New php-forum User
New php-forum User
 
Posts: 22
Joined: Wed May 02, 2012 5:27 am


Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.