Forum Moderators: open

Message Too Old, No Replies

How to backup SQL Server database to file with php

         

NooK

8:54 am on Jun 2, 2008 (gmt 0)

10+ Year Member



Wasn't sure whether to post this in the php forum or here.

I'd like to make a function to allow a website admin to save the entire SQL Server Db to a file in the local harddisk and possibly restore it too.

Is this possible?

Anybody could give me more insight on the matter?

I looked around the net but all places talk about using the sql server backup functions and the ones usefull are about mysql (And myphpadmin).

Receptional Andy

9:20 pm on Jun 2, 2008 (gmt 0)



I don't know much SQL, but if you have sufficient access, you may be able to send the appropriate commands via the PHP system() function [php.net]

NooK

1:55 pm on Jun 9, 2008 (gmt 0)

10+ Year Member



Thanks, I'll take a look.

Nutter

12:14 pm on Jun 10, 2008 (gmt 0)

10+ Year Member



You can look in the source of phpMyAdmin for the backup routine they use. I used it as a starting point for a routine I needed.

NooK

6:56 am on Jun 18, 2008 (gmt 0)

10+ Year Member



Thanks, but phpMyAdmin, as far as I know, if for mySql and not SQL Server but I'll definitelly take a look. Otherwise I am afraid I won't be able to do much :(