Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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]
[Corion]: ... Ruby script only extracts parts of the source code as Windows-specific files aren't considered relevant
[erix]: you got your work cut out for the hoidays :)
[erix]: +l
[Corion]: erix: Heh - so many things, so little time :D

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2018-07-23 11:40 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (465 votes). Check out past polls.