Use of sftp in a script

Hi,
I have a requirement wherein the client is asking us to take an export backup of a schema (database running on HPUX Itanium 64 bit) and then copy the dump file to a Windows box (Windows 2003 server).
This has to be done every Monday at 1AM. I want to automate it so that we dont do this activity manually every week.
Since the dump files needs to be copied across different platform, I believe we need to use sftp.
Could someone please help me as to how do I put it in a script?
Thanks!

user9104898 wrote:
Since the dump files needs to be copied across different platform, I believe we need to use sftp.No. The reason for using sftp would be using trusted RSA or DSA authentication (Windows account trusting the public certificate of the HPUX account), and encrypting the data transferred so deep packet inspection of the wire data will not reveal the actual contents.
Could someone please help me as to how do I put it in a script? Not the correct forum for dealing with bash scripts for HPUX. But here's the basic approach using scp instead. It serves the exact same purpose than sftp, but provides an easier single-command-line-wit-parameters interface. sftp provides a traditional ftp client interface - which in your case is totally superfluous.
#!/bin/sh
scp /local-dir/local-file.dmp accountname@windows-server:remote-file.dmpYou did not mention the ssh server software use on Windows - and what the remote directory would be. As Windows uses a different format for paths than Unix, you may need to specify the remote directory as follows:
scp /local-dir/local-file.dmp accountname@windows-server:"c:\remote-dir\remote-file.dmp"
To make trusted authentication work, copy the id_rsa.pub or id_dsa.pub files from the +$HOME/.ssh+ directory on HPUX and "tell" the Windows ssh server to trust these - on Unix that entails adding the file contents to +$HOME/.ssh/authorized_keys+. But as Windows lacks an OpenSSH implementation, who knows what it expects in this regard. It is IMO not a great choice as server o/s in the first place due to its total lack of open standards and protocols support.
This all said - keep Sybrand's comments in mind. Your assumption about having to use sftp is erroneous. If you however want to have this as an external o/s moving part using trusted and encrypted communication, then consider using scp instead (the sftp approach will be very similar, the only difference will be the command syntax).

Similar Messages

  • How to use IF Conditon in SAP Scripts?

    Hi Guys,
                   I am having adoubt how to use IF conditon with multiple variables in SAp Scripts
    for ex If a>b and a>c and a>d
             Elseif b>a and b>c and b> d.
             Elseif .....
              endif.
              How to use above example in SAP Scripts.
    thanks,
    Gopi.

    hi Gopi,
    it is almost the same as normal ABAP, you only have to use & before and after the variable and the variable has to be in capitals and you have to make the line as command ( /: before the line )
    IF &A& > &B& AND ...
    text to print
    ELSEIF ...
    text to print
    ENDIF.
    hope this helps
    ec

  • How to use perform statements in sap scripts

    how to use perform statements in sap scripts . and pls send me one progam for this
    thnaks
    raja

    Hi Raja,
    <b>PERFORM</b> key work is used to include subroutine in sapscript form...
    But the processing is lttle bit different form the one we use in ABAP.
    Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
    Check out the example below to see how this is used..
    <b>Definition in the SAPscript form:</b>
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    <b>Coding of the calling ABAP program:</b>
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY ‘PAGE’.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY ‘BARCODE’.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = ‘|’. "First page
    ELSE.
    OUT_PAR-VALUE = ‘||’. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = ‘L’. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Hope this is clear to understand...
    Enjoy SAP.
    Pankaj Singh.

  • How can I add a new certificate to be used with SFTP

    Hi,
    I wanted to know how to add a new certificate (from MS server) so it can be used by sftp. I tried certtool, but got error messages. It's a DSA cert, and I need to secure ftp to this site.
    Thanks in advance

    Hi Bob,
    > Certs, keys same difference;
       Do you regularly state your own misconceptions as if they are fact? Your lack of precision and detail make even correcting those misconceptions problematic but I'll assume that you're referring to X.509 certificates and try. X.509 certificates contain keys but they are hardly the same thing. Most important, the X.509 specification implies a mechanism of distribution and usage entirely different from the manner in which OpenSSH handles keys internally.
       The SSH applications of SSH Communications, Inc. have X.509 certificate support builtin but I don't know if they have a client for Mac OS X. Roumen Petrov has written patches for OpenSSH that are purported to allow it to use X.509 certificates. A thread on comp.security.ssh contains a link to the source code of a utility for extracting keys from X.509 certificates and reformatting them for use with OpenSSH.
       Using the correct terminology is not only conducive to fruitful communication, it helps in using Google to search for relevant reference material. Hopefully being armed with the correct terminology will help you find the information to accomplish whatever it is you're trying to do.
    Gary
    ~~~~
       Marvelous! The super-user's going to boot me!
       What a finely tuned response to the situation!

  • How to use print control in Sap script

    I would like to use print control in Sap script.Actualy my problem I have security font Troy ECF. Using this font I would like to print amount field in Check printing.
    we count download this font with sap .we talked to customer care they told we should hard code in sapscript. pls can any1 help on this how to do and how to use print control for this fonts.

    call this funcation. crate_text.
    CALL FUNCTION 'CREATE_TEXT'
             EXPORTING
               FID               =
               FLANGUAGE         =
               FNAME             =
               FOBJECT           =
             SAVE_DIRECT       = 'X'
             FFORMAT           = '*'
             TABLES
               FLINES            =
           EXCEPTIONS
             NO_INIT           = 1
             NO_SAVE           = 2
             OTHERS            = 3
           IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.

  • Using mx components in Action Script project in Flash Builder

    Hi
    I have created an Action Script project in flash builder 4 and want to use a mx.controls.button.
    The as file looks like this:
    package
        import flash.display.Sprite;
        import mx.controls.Button;
        public class as_test_project extends Sprite
            public function as_test_project()
                var btn:Button = new Button();
                btn.label = "test";
                addChild(btn);
    I have added C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\projects\framework\src as a Source Path in the project settings. I have also added framework.swc to the library path.
    I still get errors like :
    Description    Resource    Path    Location    Type
    Unable to resolve resource bundle "core" for locale "en_US".    as_test_project        Unknown    Flex Problem
    Have then tried added various Bundles folders like
    C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\projects\framework\bundles
    to the source path and library path, but I still get the errors.
    WHAT IS THE CORRECT WAY OF USING MX COMPONENTS IN A PURE ACTION SCRIPT PROJECT ?
    If I want to use th fl.controls componets instead but dont have CS3 where can I download them ?

    Thank you for your quick reply.
    But how then can I obtain the fl.controls components and use them in an Action
    Script project in Flash Builder 4?
    I don't have CS3 or CS4 (the flash authoring tool) installed.
    Is there an SWC somewhere to be downloaded?

  • Using javascript or HTML, When I click a link to a named page that already loaded in a tabbed page the tabbed page does not show, but you can see that the page relaoded. Using HTML or javascript what script will make this happen? The javascript focus() fu

    If a page is already loaded into a tab then using any of the following scripts will not cause the tabbed page to show when the link to it is clicked (created via PHP):
    "Continue Shopping".
    OR
    "Continue Shopping".
    OR
    "Continue Shopping".
    The first HTML works perfectly in the Safari browser.
    == This happened ==
    Every time Firefox opened
    == Always

    The scripts for this should have shown as:

  • Advantages of using laster printers for SAP SCRIPTS

    Dear Friends,
    Here client is saying use scripts for Dotmatrix printer, for all graphics. can i know
    <b>Wht are the advantages of using laser printers for SAP Scripts and wht are the disadvantages of using Dot-matrix printer.</b>
    Thanks & Regards
    Hussain

    Dear Friends,
    Here client is saying use scripts for Dotmatrix printer, for all graphics. can i know
    <b>Wht are the advantages of using laser printers for SAP Scripts and wht are the disadvantages of using Dot-matrix printer.</b>
    Thanks & Regards
    Hussain

  • Advantages of using laser printers for SAP SCRIPTS compare to Dot matrix

    Dear Friends
    <b>Wht are the advantages of using laser printers for SAP Scripts and wht are the disadvantages of using Dot-matrix printer.</b>
    Thanks & Regards
    Hussain

    Dear Friends
    <b>Wht are the advantages of using laser printers for SAP Scripts and wht are the disadvantages of using Dot-matrix printer.</b>
    Thanks & Regards
    Hussain

  • How to use perform and endperform in scripts

    Can anybody cleaerly explains me how to use perform and endperform in scripts with an example to add something extra dynamically to the standard script (like rvorder01).
    thanks in advance.
    regards
    anil.

    Check this example:
    In form
    PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
    USING &EKKO-EKORG&
    USING &EKPO-WERKS&
    USING &EKKO-EKGRP&
    USING &EKKO-BSTYP&
    CHANGING &COMPNAME&
    CHANGING &SENDADR&
    CHANGING &INVCADR&
    CHANGING &COMPADR&
    CHANGING &COVERLTR&
    CHANGING &SHIPADR&
    CHANGING &REMINDER&
    CHANGING &REJECTION&
    CHANGING &POSTADR&
    CHANGING &LOGO&
    ENDPERFORM
    In program
    FORM READ_TEXTS TABLES IN_PAR   STRUCTURE ITCSY
                           OUT_PAR  STRUCTURE ITCSY.
      DATA : L_EKORG TYPE EKORG,
             L_WERKS TYPE WERKS_D,
             L_BSTYP TYPE BSTYP,
             L_EKGRP TYPE BKGRP.
      READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
      CHECK SY-SUBRC = 0.
      L_EKORG = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
      CHECK SY-SUBRC = 0.
      L_WERKS = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
      CHECK SY-SUBRC = 0.
      L_EKGRP = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
      CHECK SY-SUBRC = 0.
      L_BSTYP = IN_PAR-VALUE.
      CLEAR Z08M1_ORG_TEXTS.
      SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
                                              AND WERKS = L_WERKS
                                              AND EKGRP = L_EKGRP
                                              AND BSTYP = L_BSTYP.
      IF SY-SUBRC NE 0.
        SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
                                               AND WERKS = L_WERKS
                                               AND EKGRP = L_EKGRP
                                               AND BSTYP = SPACE.
      ENDIF.
      READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'SENDADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'INVCADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'COMPADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'REMINDER'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'REJECTION'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'POSTADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'LOGO'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
      MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Check and let me know if u face any problem.
    Regards

  • Why use symbol {   } in the following script?

    Why use symbol *{   }* in the following script?
    <read-write-backing-map-scheme>
    <scheme-name>SampleDatabaseScheme</scheme-name>
    <internal-cache-scheme>
    <local-scheme>
    <scheme-ref>SampleMemoryScheme</scheme-ref>
    </local-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <class-name>com.tangosol.examples.coherence.DBCacheStore</class-name>
    <init-params>
    <init-param>
    <param-type>java.lang.String</param-type>
    *<param-value>{cache-name}</param-value>*
    </init-param>
    </init-params>
    </class-scheme>
    </cachestore-scheme>
    </read-write-backing-map-scheme>
    Thank you very much
    Edited by: jetq on Jun 24, 2009 6:26 PM

    Hi Frank,
    In the example, the "{cache-name}" is supposed to be replaced by the database's table or view name that will be queried for the data to be cached. It's purpose is demonstrate how to pass parameters to the class constructor.
    Regards,
    Harv

  • How can we use SX_OBJECT_CONVERT_OTF_INTO_PDF function module IN SCRIPT

    Hi Gurus,
    can any one inform me,how to use  SX_OBJECT_CONVERT_OTF_INTO_PDF  function module in script..
    how can we convert  the script output into pdf file format....
    i need your help......plz
    my mail id : [email protected] 
    Thanks,
    Rajkumar.A
    Edited by: rajkumar annadurai on Feb 19, 2008 10:25 AM

    Hi, Dear
    In XI 3.0 we are tyring to setup SAPconnect;
    1 Step; Create RFC connection for Mlunxsnd file, anyway!!! we download thease file and create RFC connection; fine working no error
    2 Step: Create Nodes T-code SCOT => connection INT => and support address type like Internet its just show only "PDF, HTM, TXT" thats it its not show some others format
    3. Step; When check email T-code SOST Getting an error messages: "Connot process message in node, parameters cannot be converted"
    4. In R3 RPD and Others system when I check format its ok its show some others format which is support to be such as "ALI, OBJ, OTF, SCR, URL" ...
    How may install these format in XI 3.0
    Please Advice I will be really appriciated
    Thanks a lot
    Travis

  • Connection with external System using AS2/SFTP adapter.

    Hi All,
    I need to use SFTP/AS2 to connect to an external Server which is not in our landscape.
    Can anybody could help whether i need to create a party on the Sender side as sender system is an external Server.
    I have gone through many docs but i am not clear when to use party and when not..?
    Regards,
    Rahul

    Hi Rahul
    Whether to use a party or not is both an architectural question as well as a development question.
    Architecturally, if an external server is not in your landscape and belongs to a different company/entity, your scenario would be a B2B process. You can refer to the below link for more details about B2B, but I've included a short snippet below too.
    http://help.sap.com/saphelp_nwpi711/helpdata/en/48/c7a475da5e31ebe10000000a42189b/content.htm
    Using a communication party, you address a company that is involved in a B2B process.
    The (technical) name of the communication party (for example Bosch) is the identifier for the company within an Integration Directory. To be able to identify the company during any external communication using a globally unique ID, you specify alternative identifiers for a communication party. For external communication, the name of the communication party that is known internally is mapped to the ID. A particular identifier is specified in the communication channel (see below).
    In terms of development, not all adapters (FTP, SFTP, SOAP, etc) require the use of a party object when you develop a B2B integration scenario. There are companies which have implemented all B2B scenarios using those adapters in an A2A style (using just Business Systems.)
    As Harish has mentioned, if you use the Seeburger AS2 adapter, you will need the party object (AS2ID is configured there), but if you use the SFTP adapter, it is optional.
    For your case, I'd recommend going with Party to clear distinguish that it is a B2B process.
    Rgds
    Eng Swee

  • Why use "\n" in the following script?

    Why use *"\n"* in the following script?
    Thank you
    public String toString()
    return getStreet1() + "\n" +
    getStreet2() + "\n" +
    getCity() + ", " + getState() + " " + getZip() + "\n" +
    getCountry();
    }

    qkc wrote:
    Why use *"\n"* in the following script?
    Thank you
    public String toString()
    return getStreet1() + "\n" +
    getStreet2() + "\n" +
    getCity() + ", " + getState() + " " + getZip() + "\n" +
    getCountry();
    Maybe because that's how US addresses are formatted?
    BR,
    Robert

  • Using Flach CS4 and action script 2.0 how do I advance to a specific frame of the main timeline when a movie clip instance come to the end of its timeline?

    Using Flach CS4 and action script 2.0 how do I advance to a specific frame of the main timeline when a movie clip instance come to the end of its timeline?

    code on the last frame of your movieclip instance:
    _root.gotoAndStop('whatever_frame');  // will work unless this swf is loaded into another swf.  in that situation, you should use a relative path to the main timeline (eg,  _parent or _parent._parent etc).

Maybe you are looking for