• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 540
  • Last Modified:

Can I use SQL Server to backup, zip and ftp - as a one button process

Hi
I have a requirement to backup a database, shrink it, zip it and ftp to a server all as one process (me thinks here this is going to be command line stuff) - does any body have any ideas on how to accomplish this.

Thanks

Paul
0
Paul_Blackler
Asked:
Paul_Blackler
  • 2
  • 2
2 Solutions
 
nmcdermaidCommented:
You can just create a SQL Server job with three steps.


The first step is of type 'Transact-SQL' and will contain a backup command in it, something like this:

BACKUP DATABASE <dbname> TO DISK='PathToBakFile'


The next step is of type 'CmdExec' and will contain the command line to ZIP your backup file. You'll need to download a command line zipper (I think PKZip or Winzip are the usual)


The next step is of type 'CmdExec' and will contain the command line to ftp the file. You can use the standard windows FTP or download another one.



There's lots of logging and notification stuff that you can set up here.
0
 
lluthienCommented:
backup and shrink in reverse order i hope.

furthermore, you probably want to create a job..

maintenance\sql server agent\jobs

create a step to shrink
a step to backup
then you can use the type dropdown to select a cmdExec and call the zip commandline
same goes for FTP, although you might want to create a FTP script for that

doable, but it assumes you have full controll over the DB and
you think using CMDExec is a good Idea.

personally, i'd vote no on that last one. ;)

0
 
Paul_BlacklerAuthor Commented:
I actually want to use a bespoke program called FTP Voyager from the CMDExec would that cause any problems
Thanks
0
 
lluthienCommented:
in theory, if there is commandline access to the FTP prog, there should be no problem.

i personally just have objections to the use of cmdExec from a security perspective.
0
 
Paul_BlacklerAuthor Commented:
Thanks both of you
Paul
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now