Using scp to copy files from remote server to mac from a newbie

Hi am a new poster to this forum and getting (re)acquainted with the unix world using terminal on the Mac. I am part of webteam for a large website run by a nonprofit where I have administrative access. I hope that this forum is the correct venue for my question.
The other day I used terminal tsch to logg onto a remote server where I have admin privaleges. One of the other admins and I were in the process of experimenting with using either rsync or scp to "backup" the server. We are experimenting with different backup strategies over and above those supplied by our web host. After finding out how to open port 22 on my modem and setting services in sharing to allow for remote log on, I logged on to the remote server and ran this command (suggested by another admin):
scp -r -p -v /remotefolder [email protected]:/Users/drktyler/Documents/serverBU/
Unfortunately I had severely underestimated the amount of time it would take to perform scp and needed to terminate the scp job. For example, I only got 100 MB onto my Mac in one hour (normally takes about 6 mintues to download a 100 MB file from the internet) I tried to kill the job by doing:
ctrl -z
ls ps
kill (scp pid #)
This did not work. And I forgot about trying ctrl-c <blush>
I was able to exit my session on the remote server which "exited" the scp job.
Oh, before running scp, I did try rsync and it did not work. Unfortunately, I had not set my terminal session to an unlimited buffer size, so the early part of my session rolled off the terminal screen. This means I have no idea what the error was.
This morning the other admin was performing some backups on the remote server and noticed that there was a an unexplained directory on the remote server named:
mymacuserid
It had what he called some rpms. I am not exactly sure what a rpms cache files are, but I think that rpms has some relatationship to the RPM package manager used by many linux systems. I could not account for how the mymacuserid directory got on the remote server because I did not put it there and my log in id to the remote server bears no resemblance to my Mac user id.
We don't believe that this directory did any harm to the remote server, but I sure as heck would like to know how it got there.
My question is if there was something about my scp command that
(1) created this "temporary" mymacuserid directory on the remote server
(2) did the way I ended the scp job by exiting the terminal mean that this temporary directory was not "cleaned up."?
(3) what other options might have been available to me to kill the job and clean up after the job? ctrl-c while logged onto the remote server? opening up a second terminal window and killing the ssh job?
(4) is scp normally that slow?
My Mac: Mac Mini, 1.66 GHz Intel Core Duo, Memory: 1.5 GB 667 MHz DDR2 SDRAM, Mac OS 10.4.8
Remote server: CPU AuthenticAMD, AMD Athlon(TM) XP 2600+
Version psa v8.1.1_build81070716.12 os_CentOS 4.2
OS Linux 2.6.9-55.0.2.EL {CentOS is built from Red Hat Enterprise Linux}
Respectfully yours,
treehugger from nj

J.V. Thanks so much for your very helpful response!
The other admin who was trying scp over the weekend also reported that the job ran very slowly, so I suspect the slow response time may be on the remote server end. I do appreciate knowing that you have gotten 80% of your advertised DSL speed with scp.
Thank-you for being so polite and gentle in your response. No I did not know that if the remote patname has white space in it, that I need to quote the whole path and escape any white space with preceding backslashes as you showed in your rsync example.
Finally, as for the rogue elements being left on the server, I figured out that these rogue elements were left on the server the day before I did the aborted scp job because I had to quit the terminal in the middle of an active rsync job while logged onto the remote terminal. When I went onto the server this morning, I checked the timestamps on the rogue files and the timestamps match up.
The other admin has finally succeeded in doing a full server back-up (in addition to the back-up using the back-up utility provided by our web host). So, for the moment we are in pretty good shape. Of course, I'm not sure that I could replicate what he did. <shrug>
Thanks again. I'm glad I posted on this forum as I have always learned a lot by reading the apple forums I suspect that I will be posting again.
T.H.
P.S. Please forgive me for not including copies of your original message in my reply. There is probably a setting that I need to change.

Similar Messages

  • Problem using scp to copy files between Macs

    I've been trying to copy a folder hierarchy containing a slew of icon files between two of my Macs. Using scp has proven to be futile.
    The command line I'm using is
    scp -r -p -C -E [email protected]:/Icons /Icons
    After a number of files are copied I receive the following error message on a file and all thereafter:
    ./icons/Agrapha-Christmas/Boxes: Too many open files
    More specifically the "too many open files" message.
    I am using Tiger 10.4.7
    What am I doing wrong here?

    One more piece of information. I ran scp with the verbose switch and have attached a portion of the feedback showing successfull copies followed by the error which occurs on all subsequent files:
    Entering directory: D0777 0 Adobe CS Icons
    Sending file modes: C0644 6148 .DS_Store
    .DS_Store 100% 6148 6.0KB/s 00:00
    copyfile(/icons/Adobe CS Icons/..DSStore, /tmp/scp.md.DJyatJ, PACK)
    Sending file modes: C0400 82 ..DSStore
    ..DSStore 100% 82 0.1KB/s 00:00
    copyfile(/icons/icons/Adobe CS Icons/..DSStore.N8P, /icons/icons/Adobe CS Icons/.DS_Store, UNPACK)
    Sending file modes: C0777 68489 Adobe CS Box.icns
    Adobe CS Box.icns 100% 67KB 66.9KB/s 00:01
    copyfile(/icons/Adobe CS Icons/._Adobe CS Box.icns, /tmp/scp.md.00r28e, PACK)
    Sending file modes: C0400 70745 ._Adobe CS Box.icns
    ._Adobe CS Box.icns 100% 69KB 69.1KB/s 00:00
    copyfile(/icons/icons/Adobe CS Icons/._Adobe CS Box.icns.K7Q, /icons/icons/Adobe CS Icons/Adobe CS Box.icns, UNPACK)
    Sending file modes: C0777 56691 Adobe CS Folder 2.icns
    Adobe CS Folder 2.icns 100% 55KB 55.4KB/s 00:00
    copyfile(/icons/Adobe CS Icons/._Adobe CS Folder 2.icns, /tmp/scp.md.EgDDb2, PACK)
    Sending file modes: C0400 58947 ._Adobe CS Folder 2.icns
    ._Adobe CS Folder 2.icns 100% 58KB 57.6KB/s 00:00
    copyfile(/icons/icons/Adobe CS Icons/._Adobe CS Folder 2.icns.hrC, /icons/icons/Adobe CS Icons/Adobe CS Folder 2.icns, UNPACK)
    Sending file modes: C0777 57330 Adobe CS Folder 3.icns
    Adobe CS Folder 3.icns 100% 56KB 56.0KB/s 00:01
    copyfile(/icons/Adobe CS Icons/._Adobe CS Folder 3.icns, /tmp/scp.md.rDiEBy, PACK)
    Sending file modes: C0400 59586 ._Adobe CS Folder 3.icns
    ._Adobe CS Folder 3.icns 100% 58KB 58.2KB/s 00:00
    copyfile(/icons/icons/Adobe CS Icons/._Adobe CS Folder 3.icns.5nC, /icons/icons/Adobe CS Icons/Adobe CS Folder 3.icns, UNPACK)
    Sending file modes: C0777 56289 Adobe CS Folder.icns
    Adobe CS Folder.icns 100% 55KB 55.0KB/s 00:00
    copyfile(/icons/Adobe CS Icons/._Adobe CS Folder.icns, /tmp/scp.md.CVrek6, PACK)
    Sending file modes: C0400 58545 ._Adobe CS Folder.icns
    ._Adobe CS Folder.icns 100% 57KB 57.2KB/s 00:00
    copyfile(/icons/icons/Adobe CS Icons/._Adobe CS Folder.icns.JMp, /icons/icons/Adobe CS Icons/Adobe CS Folder.icns, UNPACK)
    Sending file modes: C0777 54831 Adobe CS Logo.icns
    Adobe CS Logo.icns 100% 54KB 53.6KB/s 00:00
    copyfile(/icons/Adobe CS Icons/._Adobe CS Logo.icns, /tmp/scp.md.keUSYq, PACK)
    Sending file modes: C0400 57087 ._Adobe CS Logo.icns
    ._Adobe CS Logo.icns 100% 56KB 55.8KB/s 00:00
    copyfile(/icons/icons/Adobe CS Icons/._Adobe CS Logo.icns.M39, /icons/icons/Adobe CS Icons/Adobe CS Logo.icns, UNPACK)
    Entering directory: D0777 0 Agrapha-Christmas
    Sending file modes: C0644 12292 .DS_Store
    .DS_Store 100% 12KB 12.0KB/s 00:00
    copyfile(/icons/Agrapha-Christmas/..DSStore, /tmp/scp.md.1s6tDJ, PACK)
    Sending file modes: C0400 82 ..DSStore
    ..DSStore 100% 82 0.1KB/s 00:00
    copyfile(/icons/icons/Agrapha-Christmas/..DSStore.Jmw, /icons/icons/Agrapha-Christmas/.DS_Store, UNPACK)
    Sending file modes: C0777 0 Angel
    Angel 100% 0 0.0KB/s 00:00
    copyfile(/icons/Agrapha-Christmas/._Angel, /tmp/scp.md.hueGHQ, PACK)
    Sending file modes: C0400 44820 ._Angel
    ._Angel 100% 44KB 43.8KB/s 00:00
    copyfile(/icons/icons/Agrapha-Christmas/._Angel.ZDF, /icons/icons/Agrapha-Christmas/Angel, UNPACK)
    Sending file modes: C0777 0 Basket
    Basket 100% 0 0.0KB/s 00:00
    copyfile(/icons/Agrapha-Christmas/._Basket, /tmp/scp.md.8NWfFT, PACK)
    Sending file modes: C0400 49608 ._Basket
    ._Basket 100% 48KB 48.5KB/s 00:00
    copyfile(/icons/icons/Agrapha-Christmas/._Basket.eIY, /icons/icons/Agrapha-Christmas/Basket, UNPACK)
    Sending file modes: C0777 0 Boxes
    Boxes 100% 0 0.0KB/s 00:00
    copyfile(/icons/Agrapha-Christmas/._Boxes, /tmp/scp.md.oWFB8k, PACK)
    Sending file modes: C0400 46314 ._Boxes
    ._Boxes 100% 45KB 45.2KB/s 00:00
    copyfile(/icons/icons/Agrapha-Christmas/._Boxes.GGu, /icons/icons/Agrapha-Christmas/Boxes, UNPACK)
    Sending file modes: C0777 0 Broach
    /icons/icons/Agrapha-Christmas/Broach: Too many open files
    Sending file modes: C0777 0 Candy Cane
    /icons/icons/Agrapha-Christmas/Candy Cane: Too many open files
    Starting with the Broach file, all subsequent files display the error "too many open files".

  • How to copy file to another server from database using FTP in oracle

    How to copy file to another server from database using FTP in oracle.
    Please do the needfaul.

    Billy  Verreynne  wrote:
    BluShadow wrote:
    Not to mention that some FTP servers can return more than one return message per operation whereas others may return one message for the same operation.I had the problem using the LIST command to determine if a file exists on the server. Cannot be determined via the FTP server's return code. Which means parsing and checking the text response from the server to the command. And this vary from server to server.
    But the basics were quite easy to code. The entire package is 500 lines, includes comments and blank lines for formatting, and supports the basic FTP client command set. Not really a complex piece of software to write - but I found that many developers seem to think that writing network socket software is complex. Not really the case...Mine's a big larger, but incorporates functionality similar to what Chris provided in his, such as being able to use SQL to query a remote file using pipelined functions, or functionality to write the results of a query directly to a remove file.
    :)

  • HOw to delete files from remote server?

    Hi,
    I want to delete files from a directory on remote server.
    I use the following command to delete on current server:
    find $srcdir -mtime +90 -name "COR*.txt" -exec rm -f {} \;
    Now, how can I delete files from remote server ?
    Thanks!
    Yogini

    Some possible options:
    1. There exists SSH implementation for Windows.
    2. You can make a workaround. You can setup share for specific/wanted directory.
    Then you can mount it on Linux machine and execute command localy and delete files "localy" in mounted directory.
    3. You can setup FTP server on Windows machine and do that remotely via FTP commands.

  • Help! Downloading a file from remote Server

    I am currently doing a program for downloading a specified file from the remote server i.e from any website. If the downloading process stops in between due to some problem in the internet connection, then my program needs to start the downloading the file again to the local directory from where it was left.
    My idea is that, getting the size of the remote file initially when the downloading process starts and if the connection is interrupted, i will check the size of the downloaded file in the local directory with the remote file size. If the remote file size is greater than the localfile size, i need to start downloading the file where it was left i.e start downloading the next bit from the remote file.
    Is there any way to get the contents of the remote file from the specified point say 50th byte from a total file size of 100 kb using java?
    which concept to use FtpClient or sockets?
    iam a little bit confused!!!!
    Please help me.
    Thanks in advance.

    For HTTP you can use this function to open the stream with offset:
    InputStream openStream(URL url, long offset) {
        try {
            URLConnection uc = url.openConnection();
            uc.setRequestProperty("Authorization", "Basic " + (new BASE64Encoder()).encode("username:password".getBytes()));
            if (offset != 0 && url.openConnection().getHeaderField(0).toUpperCase().startsWith("HTTP/1.1"))
                uc.setRequestProperty("Range", "bytes=" + offset + "-");
            return new BufferedInputStream(uc.getInputStream());              
        } catch (MalformedURLException mfURLe) {
            System.err.println("Malformed URL in Client Updater. Unable to receive update list: " + mfURLe.getMessage());
        } catch (IOException ioe) {
            System.err.println("Unable to open input stream: " + ioe.getMessage());
        return null;
    }

  • Using ARD to copy files remotely?

    Hi,
    I was thinking it is possible to use ARD to copy files from my home imac, when I am in the office using my macbook? Or this can only be done when I am on the same network? Thanks in advance.

    Should work fine provided you have ARD fully working between the two sites.

  • How do I copy files onto a hard drive (device) from Mac 2 7 pc. I'm able to transfer files from device but cannot transfer files to device. Anyone had same problem or can help solve this problem? Help pls

    how do I copy files onto a hard drive (device) from Mac 2 7 pc. I'm able to transfer files from device but cannot transfer files to device. Anyone had same problem or can help solve this problem? Help pls

    Welcome to Apple Support Communities
    When you try to copy data to the external drive, what happens? If you don't see any error, the external drive is formatted in NTFS, and OS X can't write in it.
    To be able to write on this external drive, you have to use an app like Paragon NTFS. Another solution would be to format the external drive in FAT32 or exFAT with Disk Utility > http://pondini.org/OSX/DU1.html Make sure you copied all the files of the external disk to the internal disk before doing it

  • Drag and drop from remoter server

    Drag and drop from remoter server I get this<img src="../My Documents/SITKA/Unnamed Site 6/4coldfront_jacketAD.jpg" width="207" height="207" longdesc="http://www.jonsered.ws" /> what I want is this <img src="http://www.jonsered.ws/coldfront_jacketAD.jpg" width="207" height="207" longdesc= />
    the first one does not work on the web
    How is this done?

    When you click on a file (drag & drop) in Remote Server panel, DW GETS the file and places it in your Local Site folder.
    Your local site is defined in DW as ./My Documents/SITKA/Unnamed Site 6/.  Hence the path name change.
    Make sense?
    Nancy O.

  • Can't call a VI from remote server

    I have a VI running on a labview development machine(Labview 2010), the main function is handling excel report using report generator. I follow the link http://www.ni.com/white-paper/14469/en to set up labview machine and teststand machine respectly. But when I tried to call the VI from remote server, it is still not able to load the VI front panel and show the connectors. See the  attachment. It looks like it still trying to load VI from local drive because it can't find the builded-in subvis for report generator function.
    What should I do to make it work? Thanks!
    Solved!
    Go to Solution.
    Attachments:
    TestStand error.png ‏107 KB

    For those interested in the solution, the problem turned out to be two things.
    The first is if you want to be able to load a prototype of the VI in TestStand, you will need to either share the VI or create a dummy VI. If the shared VI uses subVIs you do not have access to, then you are better of creating a dummy VI that has matching connector panes.
    The second problem had to do with how the remote VI path was specified. If you have shared the VI, then you will enter in the shared folder path as your remote VI path. If you have not shared it, then you will need to enter in the VI path as it is on the remote machine.
    Rohama K.

  • Can't See Files On Remote Server

    Wondering if anyone has a fix for not seeing files
    on remote server... It's even got my host stumped. I have a fairly
    large static site which I CAN SEE files via my host's "File
    Manager" 90 Folders 3090 Files 52,336.74KB
    But I cannot see files and folders when connected FTP via
    IPSwitch or Dreamweaver 8.
    I have followed IPSwitch's troubleshooting steps for this
    issue, with no resolve. Emailed them a week ago, still no reply.
    I have other sites at the same host (sub-domains of the site
    I cannot see), and thoise subdomain sites files and folders show up
    fine. With the primary site, even though I cannot "see" the files
    and folders, I can still ftp to and from the server (get & put)
    from DW or IPSwitch...

    No... I am looking at the correct folders, etc. The host is a
    commercial host for Fortune 500's, I fairly confident in their
    abilities. They think it might have something to do with long file
    names. There is one clue, in that at one time I could view the
    files and folders. Since that time it is possible I added a page
    with a file name that is too long and is causing the issue. I will
    probbaly need to temporarily delete these long file name pages to
    see if it's the issue or not. I just thought someone here may have
    experienced this. Not being able to view files and folders (even
    though you can connect and transfer okay) is a pretty common
    troubleshooting topic at the FTP software companies.
    quote:
    Originally posted by:
    Newsgroup User
    It's time to change hosts, if they can't figure this one out.
    You must be
    looking at the wrong folder with DW/Ipswitch....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "DJ Website Designer" <[email protected]>
    wrote in message
    news:floqjp$rl2$[email protected]..
    >
    Wondering if anyone has a fix for not seeing files
    on remote
    > server... It's even got my host stumped. I have a fairly
    large static site
    > which I CAN SEE files via my host's "File Manager" 90
    Folders 3090 Files
    > 52,336.74KB
    >
    > But I cannot see files and folders when connected FTP
    via IPSwitch or
    > Dreamweaver 8.
    >
    > I have followed IPSwitch's troubleshooting steps for
    this issue, with no
    > resolve. Emailed them a week ago, still no reply.
    >
    > I have other sites at the same host (sub-domains of the
    site I cannot
    > see),
    > and thoise subdomain sites files and folders show up
    fine. With the
    > primary
    > site, even though I cannot "see" the files and folders,
    I can still ftp to
    > and
    > from the server (get & put) from DW or IPSwitch...
    >

  • Debug flex app loaded from remote server

    Hi,
    I'm developing a flex app which gets loaded from a remote
    server and it connects using amf to that server and gets some data.
    Now, I can't test from within the flex builder ide, as the URL will
    be empty. When I test using IE/Firefox pointing to the remote
    server URL where this debug.html is mounted, the swf asks for a
    host ip/name where a flash/flex debugger runs. When I give
    localhost/127.0.0.1, it fails and displays the dialog box again. Is
    there a way to connect the swf from remote server to connect to a
    debug console inside the FB2 ide?

    Well, I ran all commands shipped with FB2and found out that
    fdb does connect and allows to "continue". Still the in IDE
    developing experience and quick turn around isn't there. Is there a
    way to get the URL from which the swf was loaded from within the
    swf, so that if its a remote server, I can get data from it, else
    its in debug state, so I can get data from some hard coded
    host.

  • How To read/write file on remote server in java

    Hi All,
    How To read/write file on remote server in java? I mean using URL - http://www.xyz.com can I right file to that perticular server.
    Thanks in advance

    If your server support a means of uploading files you can.
    A popular means is [http://en.wikipedia.org/wiki/WebDAV]
    However, by default web server don't allow you upload files, its usually something you need to configure or install.
    I suggest you have a look at your web servers documentation.

  • I am trying to softproof an image using a CMYK .icc file. I sent an image from LR 5 to PS CC 2014, opened the Camera Raw FIlter, but the hyperlink to access workflow is not showing up in the CR dialogue box... Any ideas why this might be?

    I am trying to softproof an image using a CMYK .icc file. I sent an image from LR 5 to PS CC 2014, opened the Camera Raw FIlter, but the hyperlink to access workflow is not showing up in the CR dialogue box... Any ideas why this might be?

    I am trying to softproof an image using a CMYK .icc file. I sent an image from LR 5 to PS CC 2014, opened the Camera Raw FIlter, but the hyperlink to access workflow is not showing up in the CR dialogue box... Any ideas why this might be?

  • Put files onto Remote Server?

    I am connected to the remote server and have tried repeatedly to put files onto remote server. It either says successful or not transferred and the new page never gets put up. What am I doing wrong? I have put files on my remote server before, but all of a sudden it is not working for me.

    This is what it is saying..
    Started: 7/22/2013 3:21 PM
    Website\5K_run08.html - same - not transferred
    Website\images\nav_home_on.gif - same - not transferred
    Website\images\nav_info_on.gif - same - not transferred
    Website\images\nav_photos_on.gif - same - not transferred
    Website\images\nav_members_on.gif - same - not transferred
    Website\images\nav_minutes_on.gif - same - not transferred
    Website\images\nav_faq_on.gif - same - not transferred
    Website\images\nav_home_off.gif - same - not transferred
    Website\images\nav_info_off.gif - same - not transferred
    Website\images\nav_photos_off.gif - same - not transferred
    Website\images\nav_members_off.gif - same - not transferred
    Website\images\nav_minutes_off.gif - same - not transferred
    Website\images\nav_faq_off.gif - same - not transferred
    Website\images\header.jpg - same - not transferred
    Website\images\button_friend.jpg - same - not transferred
    Website\images\run_button_blue.jpg - same - not transferred
    Website\images\committee_button.jpg - same - not transferred
    Website\images\map_button3_blue.jpg - same - not transferred
    Website\images\links_button_blue.jpg - same - not transferred
    File activity complete.
    Files skipped: 19
    Finished: 7/22/2013 3:21 PM

  • Change character set used to write a file in application server.

    Hello Experts,
                       I want to know if we can change the character set used to create a file in application server.(Is it posible to use a particular character set while creating a file in application server.
                      I will be very great full for any help.
    Thanks in advance.
    Sharath

    Hello Sarath,
    There is an extension CODE PAGE with OPEN DATASET stmt.
    Can you please elaborate which character set you want to write to the application server?
    BR,
    Suhas

Maybe you are looking for

  • IChat "unexpectedly quits"

    I was working in another program with iChat running in the background. iChat was logged into my GTalk and .Mac accounts. Suddenly I get a popup that iChat Agent has unexpectedly quit and I was logged out of both accounts. I was able to log back into

  • HR: Program name for Indian Payment Medium - Check

    Hi Can anybody tell me what is the name of the program to print check for India regards, Aabhas

  • Oracle stored query(SQE )

    Hi guru, I am trying to use SQE operator in my contains query but I don't know why it is not working in my case.I tried it on Oracle 11g installaion with window and Linux both but did not get success. Please tell me if I am doing somethign wrong ...

  • How to schedule an abap report program to run every day, weekend etc..

    Hi, I want to schedule an abap report program to run every day, week, fortnight or month and the output to be redirected to the printer. How to achieve this ? thanks

  • "More bookmarks" list does not appear

    Randomly,when I click this icon " >> " in order to see more bookmarks,nothing appears.If I refresh the page it works just fine,but after five minutes,or so, it might happen again.