1822894 Members
3653 Online
109645 Solutions
New Discussion юеВ

mysql backup!!

 
SOLVED
Go to solution
ajay_34
Occasional Advisor

mysql backup!!

hi all,
1.i have 3 years(2002,2003,2004) data hosted in mysql database server.i want to backup one year records(whole 2003 records).please give me any idea for this.
2.usually i take backup using mysqldump command.6 months back i backed up all the data from database and deleted all the records. so i want to add old data(6months back data) to my existing database. but i am getting some errors like table allready exist.
any idea?

thanks in advance.

ajay
4 REPLIES 4
Nguyen Anh Tien
Honored Contributor

Re: mysql backup!!

I recommend you using phpmyadmin.
Link to :
http://www.phpmyadmin.net/home_page/index.php.

HP is simple
NiCK_76
Respected Contributor
Solution

Re: mysql backup!!

Hi ajay,
My suggestion that move whole 2003 records to another table.

INSERT INTO newtable SELECT * FROM oldtable where year = '2003';
delete from oldtable where year= '2003'


NiCK
just for fun
Jan Sladky
Trusted Contributor

Re: mysql backup!!

tricky question without knowledge of your db,

but generaly you should be able to do select all 2003 data and redirect to the file. Than you can modified this file to the real backup file (insterting insert into table blabla...)

second way is move 2003 data to the separate table in new db and do mysqldump of this db


If I good remember, before restoring of mysqldump file you must remove the tables. If you have a look inside the file , you are gonna see that the tables will be created again.

rgds Jan
GSM, Intelligent Networks, UNIX
ajay_34
Occasional Advisor

Re: mysql backup!!

hi ,
Tien its really a good tool to mysql administration.thanks for your suggestion.but i am worrying about the security.is there any way for password protuction to phpmyadmin tool?

nick , sladky thank you very much for your suggestion. now i got solution to my problem.thank you very much.

regards,
ajay.