BVS Blog [dot] BE

De technische blog van de persoon gekend als BVS

Backup maken via PHP script op SQL Niveau

Filed under: mySQL — bjornvs at 11:51 pm on Wednesday, April 25, 2007

mySQL Logo (kleiner)

You can also make selective backups of individual files:

To dump the table, use SELECT * INTO OUTFILE ‘file_name’ FROM tbl_name.

To reload the table, use LOAD DATA INFILE ‘file_name’ REPLACE …. To avoid duplicate rows, the table must have a PRIMARY KEY or a UNIQUE index. The REPLACE keyword causes old rows to be replaced with new ones when a new row duplicates an old row on a unique key value.

Bron URL

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.