FTP Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jt

    FTP Question

    Hi ng,

    we do have a MS-SQL Server in production use which I want to dump its
    contents nightly onto a ftp site.

    The ftp does not accept anonymous logins; can anyone point me in the
    appropiate direction on how to automate this ? The dump is drawn using the
    following:

    EXECUTE master.dbo.xp_s qlmaint N'-PlanID
    D9A8D500-18F8-409A-A7ED-E7BD31E0AC26 -WriteHistory -VrfyBackup -BkUpMedia
    DISK -BkUpDB "d:\MSSQL\BACKU P" -DelBkUps 2WEEKS -CrBkSubDir -BkExt "BAK"'

    The path in hyphens ( D:\..... ) needs to be replaced with the ftp site
    data. ( i. e. someuser@ftpsit e.... ); how do I come up with the right
    verbiage ?


    jt



  • mountain man

    #2
    Re: FTP Question

    "jt" <foo@bar.org> wrote in message
    news:40332ae2$0 $17559$9b4e6d93 @newsread4.arco r-online.net...[color=blue]
    > Hi ng,
    >
    > we do have a MS-SQL Server in production use which I want to dump its
    > contents nightly onto a ftp site.
    >
    > The ftp does not accept anonymous logins; can anyone point me in the
    > appropiate direction on how to automate this ? The dump is drawn using the
    > following:
    >
    > EXECUTE master.dbo.xp_s qlmaint N'-PlanID
    > D9A8D500-18F8-409A-A7ED-E7BD31E0AC26 -WriteHistory -VrfyBackup -BkUpMedia
    > DISK -BkUpDB "d:\MSSQL\BACKU P" -DelBkUps 2WEEKS -CrBkSubDir -BkExt "BAK"'
    >
    > The path in hyphens ( D:\..... ) needs to be replaced with the ftp site
    > data. ( i. e. someuser@ftpsit e.... ); how do I come up with the right
    > verbiage ?[/color]


    Write a second task to do the ftp from d:\etc to the ftp location
    and schedule it after the standard backup would have completed.





    Comment

    • jt

      #3
      Re: FTP Question

      Hi moutain man,

      thanks for the input.
      But how do I supply credentials for the ftp site ( username password )
      within a CmdExec task ?

      "mountain man" <hobbit@souther n_seaweed.com.o p> schrieb im Newsbeitrag
      news:XGGYb.6478 9$Wa.42275@news-server.bigpond. net.au...[color=blue]
      > "jt" <foo@bar.org> wrote in message
      > news:40332ae2$0 $17559$9b4e6d93 @newsread4.arco r-online.net...[color=green]
      > > Hi ng,
      > >
      > > we do have a MS-SQL Server in production use which I want to dump its
      > > contents nightly onto a ftp site.
      > >
      > > The ftp does not accept anonymous logins; can anyone point me in the
      > > appropiate direction on how to automate this ? The dump is drawn using[/color][/color]
      the[color=blue][color=green]
      > > following:
      > >
      > > EXECUTE master.dbo.xp_s qlmaint N'-PlanID
      > >[/color][/color]
      D9A8D500-18F8-409A-A7ED-E7BD31E0AC26 -WriteHistory -VrfyBackup -BkUpMedia[color=blue][color=green]
      > > DISK -BkUpDB "d:\MSSQL\BACKU P" -DelBkUps 2WEEKS -CrBkSubDir -BkExt[/color][/color]
      "BAK"'[color=blue][color=green]
      > >
      > > The path in hyphens ( D:\..... ) needs to be replaced with the ftp site
      > > data. ( i. e. someuser@ftpsit e.... ); how do I come up with the right
      > > verbiage ?[/color]
      >
      >
      > Write a second task to do the ftp from d:\etc to the ftp location
      > and schedule it after the standard backup would have completed.
      >
      >
      >
      >
      >[/color]


      Comment

      • Dan Guzman

        #4
        Re: FTP Question

        > But how do I supply credentials for the ftp site ( username password )[color=blue]
        > within a CmdExec task ?[/color]

        One method is to create a DTS package to do the FTP and execute it with
        DTSRUN in the CmdExec task. You could also execute FTP directly from the
        CmdExec with the -s option to specify a file containing the FTP commands.

        --
        Hope this helps.

        Dan Guzman
        SQL Server MVP

        "jt" <foo@bar.org> wrote in message
        news:40333e78$0 $28963$9b4e6d93 @newsread2.arco r-online.net...[color=blue]
        > Hi moutain man,
        >
        > thanks for the input.
        > But how do I supply credentials for the ftp site ( username password )
        > within a CmdExec task ?
        >
        > "mountain man" <hobbit@souther n_seaweed.com.o p> schrieb im Newsbeitrag
        > news:XGGYb.6478 9$Wa.42275@news-server.bigpond. net.au...[color=green]
        > > "jt" <foo@bar.org> wrote in message
        > > news:40332ae2$0 $17559$9b4e6d93 @newsread4.arco r-online.net...[color=darkred]
        > > > Hi ng,
        > > >
        > > > we do have a MS-SQL Server in production use which I want to dump its
        > > > contents nightly onto a ftp site.
        > > >
        > > > The ftp does not accept anonymous logins; can anyone point me in the
        > > > appropiate direction on how to automate this ? The dump is drawn using[/color][/color]
        > the[color=green][color=darkred]
        > > > following:
        > > >
        > > > EXECUTE master.dbo.xp_s qlmaint N'-PlanID
        > > >[/color][/color]
        > D9A8D500-18F8-409A-A7ED-E7BD31E0AC26 -WriteHistory -VrfyBackup -BkUpMedia[color=green][color=darkred]
        > > > DISK -BkUpDB "d:\MSSQL\BACKU P" -DelBkUps 2WEEKS -CrBkSubDir -BkExt[/color][/color]
        > "BAK"'[color=green][color=darkred]
        > > >
        > > > The path in hyphens ( D:\..... ) needs to be replaced with the ftp[/color][/color][/color]
        site[color=blue][color=green][color=darkred]
        > > > data. ( i. e. someuser@ftpsit e.... ); how do I come up with the right
        > > > verbiage ?[/color]
        > >
        > >
        > > Write a second task to do the ftp from d:\etc to the ftp location
        > > and schedule it after the standard backup would have completed.
        > >
        > >
        > >
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • louis nguyen

          #5
          Re: FTP Question

          Check out this article

          Comment

          • mountain man

            #6
            Re: FTP Question

            "jt" <foo@bar.org> wrote in message
            news:40333e78$0 $28963$9b4e6d93 @newsread2.arco r-online.net...[color=blue]
            > Hi moutain man,
            >
            > thanks for the input.
            > But how do I supply credentials for the ftp site ( username password )
            > within a CmdExec task ?[/color]


            In the absence of further information, not having previously ftp'd
            out of SQL server, my inclination would be to find some ftp.exe
            which will accept parameters (eg: input and output locations, account
            credentials and p/w's, and run it via a batch file, passing the appropriate
            params into it from the batch file.

            If there are other solutions out there, someone should pipe up
            sooner or later.

            Good luck!





            [color=blue]
            > "mountain man" <hobbit@souther n_seaweed.com.o p> schrieb im Newsbeitrag
            > news:XGGYb.6478 9$Wa.42275@news-server.bigpond. net.au...[color=green]
            > > "jt" <foo@bar.org> wrote in message
            > > news:40332ae2$0 $17559$9b4e6d93 @newsread4.arco r-online.net...[color=darkred]
            > > > Hi ng,
            > > >
            > > > we do have a MS-SQL Server in production use which I want to dump its
            > > > contents nightly onto a ftp site.
            > > >
            > > > The ftp does not accept anonymous logins; can anyone point me in the
            > > > appropiate direction on how to automate this ? The dump is drawn using[/color][/color]
            > the[color=green][color=darkred]
            > > > following:
            > > >
            > > > EXECUTE master.dbo.xp_s qlmaint N'-PlanID
            > > >[/color][/color]
            > D9A8D500-18F8-409A-A7ED-E7BD31E0AC26 -WriteHistory -VrfyBackup -BkUpMedia[color=green][color=darkred]
            > > > DISK -BkUpDB "d:\MSSQL\BACKU P" -DelBkUps 2WEEKS -CrBkSubDir -BkExt[/color][/color]
            > "BAK"'[color=green][color=darkred]
            > > >
            > > > The path in hyphens ( D:\..... ) needs to be replaced with the ftp[/color][/color][/color]
            site[color=blue][color=green][color=darkred]
            > > > data. ( i. e. someuser@ftpsit e.... ); how do I come up with the right
            > > > verbiage ?[/color]
            > >
            > >
            > > Write a second task to do the ftp from d:\etc to the ftp location
            > > and schedule it after the standard backup would have completed.
            > >
            > >
            > >
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Lyndon Hills

              #7
              Re: FTP Question

              On Thu, 19 Feb 2004 00:14:55 GMT, "mountain man"
              <hobbit@souther n_seaweed.com.o p> wrote:
              [color=blue]
              >"jt" <foo@bar.org> wrote in message
              >news:40333e78$ 0$28963$9b4e6d9 3@newsread2.arc or-online.net...[color=green]
              >> Hi moutain man,
              >>
              >> thanks for the input.
              >> But how do I supply credentials for the ftp site ( username password )
              >> within a CmdExec task ?[/color]
              >
              >
              >In the absence of further information, not having previously ftp'd
              >out of SQL server, my inclination would be to find some ftp.exe
              >which will accept parameters (eg: input and output locations, account
              >credentials and p/w's, and run it via a batch file, passing the appropriate
              >params into it from the batch file.
              >
              >If there are other solutions out there, someone should pipe up
              >sooner or later.
              >
              >Good luck!
              >[/color]

              The windows/dos ftp client can be scripted. We do this at work.

              It's easiest if everything is constant, by which I mean I always want
              to ftp a file with a fixed name to a fixed location.

              the script (a text file) will look something like
              open ftp.foo.com
              user: fred
              pass: fred
              cd /public/upload
              put c:\temp\myfile
              quit

              basically it's just a list of commands that you would type in at the
              keyboard to achieve your result.

              and the scheduled job is like ftp < myscript.txt

              If the filename varies then you might need to use mput with a wildcard
              instead of put, but that is the gist of it.

              The above might not be the exact syntax, as this is from memory. Post
              or mail again if you have problems and I'll find some live code.


              Comment

              Working...