Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Backup Sql databse

by Corion (Pope)
on Feb 02, 2012 at 10:31 UTC ( #951406=note: print w/replies, xml ) Need Help??

in reply to Backup Sql databse

I don't know why your script "fails" or why the file gets removed (maybe by the database server). Consider looking at the webserver error logs or the database server error logs.

In the long run, you don't want to run your backup(s) with the hope that the user keeps their browser window open and that the browser does not time out. See Watching Long Processes Through CGI for a technique to show a "please wait" or a "backup progress" page while the backup gets generated.

Replies are listed 'Best First'.
Re^2: Backup Sql databse
by tobyink (Abbot) on Feb 02, 2012 at 11:04 UTC

    Indeed - backups are the kind of thing cron jobs (or on Windows, Scheduled Tasks) were invented for.

    dmsparts appears to be using Microsoft SQL Server. There are facilities for scheduling regular backups of a database built right into the SQL Server management console.

      While such facilities exist I think it's clear that OP wants to do this dynamically (not as a scheduled task) and remotely. The TSQL method seems like a reasonable solution to this.

      If you are using SQL Server Express I believe Maintenance Plans are not available.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://951406]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2018-05-24 05:11 GMT
Find Nodes?
    Voting Booth?