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:
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.
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.

October 11, 2015

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

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 th

Remotely Controlling A Mac From A PC

How can someone remotely control a Mac from a PC? What would need to be set to allow a PC access?If you have enabled remote access (ssh) and you have configure your router to allow incoming ssh connections to your mac then you could access your mac v

Lost my files, can I dl from remote server?

So, I'm stupid and arrogant and didn't back up my computer and of course my hard drive failed. I'm also clueless to most of this html web design stuff but do it myself anyway cause that's just how I am. That and being poor. Anyway, is there a way to

Read XML files from remote server

Post Author: TomDegetel CA Forum: Data Integration This question may look simple to you but I don't see directly how to do this.The idea is to read data from an XML file which is sent to a UNIX directory on a server.When the JobServer is running on m

How to execute an SSIS package on a scheduled basis from remote server and pass in input files

I have an application server and a db server.  My db server has all things SQL Server stored on it (DBMS, SSRS, SSIS, etc.)  I have several nightly batch process SSIS packages (dtsx files currently) that will pickup an input file and import them into

Don't print files which came from remote server software

I have  HP LaserJet Pro M1132 and in local network it works fine but if i try to print files over remote desktop connection via terminal services easy print it send files to printer Que but don't print them. please helpHow do I delete them? These: /

How Do I Copy Files to MS Windows Local Drive From ASM

All, How to I refer to a Windows drive letter in the cp command? When I use C:\my_path\my_file ASMCMD gives me an ASMCMD-08010 no user name is specified in remote instance because it thinks the colon is part of a connect string. I've spent a whole af

Create Powershell Mailbox Exchange 2010 from remote server slow

I create AD Users and Mailboxes from servers via PowerShell script from a remote machine. It worked fine and all of a sudden it takes anywhere between 10 and 20 minutes for the mailbox to create. I logged into the remote powershell script machine, op

Get Local Files on Remote server

Hello, We have a project where each computer in our office will have different files in a folder on their local computer named C:\Scanned. We would like to keep up with what is in each directory and put it in the database on the remote server. We hav

Error message in Putting a file to remote server

Hi: Although I am able to connect to the remote server, I am receiving the following error message when "putting" a file: An FTP error occurred - cannot put prices.php.  Access denied.  The file may not exist, or there could be a permission prob

How do I update template-related files on remote server

I've created a template as a way to keep the pages consistent across my intranet site but when I need to make changes to the template, I'm unsure how to update the remote files to follow the changes. In order to update locally, I go to Modify>Templat

Read File using File adapter from remote server

I need put poll on remote directory for files. Can some one tell where to put the remote connection details? Thanks KKSorry dumb question!!!! We can use GetFile operation in FTP adapter..... Thanks KKRead other 2 answers

I'm running 10.7.4 and have many problems using webdav to link to a remote server

I connect to a company called Egnyte which provides remote data storage. Their solution is really elegant, but I have a lot of problem with speed using the webdav plug in. It is especially bad on Microsoft Office documents which can take up to a minu

Removing a service from windows server when deleted from registry

I have a service in services.msc with the description saying "Failed to read description. Error code:2". The problem is the service isnt in the registry, using "sc delete" wont work. Ive tried adding the key into the registry with the

What is component used to display system files in FTP

Hello, I would like to know what is the component that is used to display system files and remote server files in a FTP. e.g File Name || File Type || File Size 1.jsp JSP file 1kb JAVA file 10 kb Do we need to use JTable to display the headers

Moving users from one server to another using Shared Services

How do you migrate users and groups from one server to another from Hyperion Shared Services in version 9.3.1? When users were provisioned from EAS on version 7.x we could use Migration Utility but now since users are provisioned using Shared Service

Remote Server - WLST Deployment adapter error

Hi everyone. I have a issue I hope you can help with. The task: To use a Python script to create a FTP Adapter / DbAdapter connection to a remote server. The problem: Script works fine with WebLogic working on localhost but gives <b>error with any r

Can't Preview iView on remote server

I had my iView working properly, however when I made a little change and deployed a par file I couldn't preview it anymore. I changed everything back, but it didn't help. Everything is working correctly on my local portal, but not on remote one. Plea

Can not copy files to network share

Hi everyone. We have a Windows Server 2003r2 64-bit. There are a few network share on this server and folders with user profiles (we use roaming profile in our infrastructure). A few days ago some users lost possibility to copy files on any network s