Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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]
[beech]: which one?
[holli]: chicken chillie Xtra hot :)
[holli]: this shit burns at least twice

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-12-13 01:57 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (344 votes). Check out past polls.