Prompt for database content backup

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
orangeapple
Forum Commoner
Posts: 70
Joined: Tue Jan 06, 2004 1:24 pm
Location: Geneva / Switzerland

Prompt for database content backup

Post by orangeapple »

Hi everyone,

Does somebody know how to open a prompt window to 'save as' the content of my database.
Thanks for your help.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Where ? :?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

User avatar
orangeapple
Forum Commoner
Posts: 70
Joined: Tue Jan 06, 2004 1:24 pm
Location: Geneva / Switzerland

Post by orangeapple »

I need to script in php to enable the client to save the content of the database where he wants to.
Tkx
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

like be able to download the contents of the database? that i have never done but i would imagine doing somthing like

-get contents of database and make it nice and neat looking
-create a new txt file with some random name and then write the info to the txt file
-redirect the user to the new text file so it shows it and they can do whatever with it

there might be able to do other things or whatnot but thats what i would do
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

orangeapple wrote:I need to script in php to enable the client to save the content of the database where he wants to.
Tkx
Some of this depends on the database of course, but you need to issue the appropriate commands to the database to dump itself to a file. Once that's done, then you could zip, tar, or whatever then either save it to disk (which I would do anyways), email it to the user, or have the individual download it.

Those are your basic steps. :wink:
Post Reply