topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday April 15, 2024, 11:12 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: FTP - How do I duplicate / copy remote folder?  (Read 12923 times)

Ampa

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
  • I am cute ;)
    • View Profile
    • MonkeyDash - 2 Player strategy boardgame
    • Donate to Member
FTP - How do I duplicate / copy remote folder?
« on: February 08, 2008, 07:54 AM »
I am working on a website MyDomain.net and have created a subdomain Preview.MyDomain.net where I make all changes.

Once the client has OKed the update I need to copy the Preview site over the Live site, but Filezilla doesn't have the ability to copy - indeed a search of their FAQ reveals that "there is no copy command in the FTP Protocol".

OK so what is the solution?

Sure, I could reupload the site from my local drive to the remote server, but surely copying on the remote server would be far quicker?

Ampa

wilfrednilsen

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 22
    • View Profile
    • Donate to Member
Re: FTP - How do I duplicate / copy remote folder?
« Reply #1 on: February 08, 2008, 09:48 AM »
The FTP protocol is outdated. Use WebDAV – i.e. request that your hosting provider makes it possible to use WebDAV.

Windows and Mac have built in WebDAV clients. For example using the Windows WebDAV mini redirector, map a drive letter in Windows to your remote server and use it as a standard drive.

allen

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,206
    • View Profile
    • Donate to Member
Re: FTP - How do I duplicate / copy remote folder?
« Reply #2 on: February 08, 2008, 10:22 AM »
on a unix system with shell access, you could telnet in and use the ol cp -r dirname copyname

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Re: FTP - How do I duplicate / copy remote folder?
« Reply #3 on: February 08, 2008, 11:48 AM »
<a href="https://sridharkatakam.com">My blog</a>

Ampa

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
  • I am cute ;)
    • View Profile
    • MonkeyDash - 2 Player strategy boardgame
    • Donate to Member
Re: FTP - How do I duplicate / copy remote folder?
« Reply #4 on: February 08, 2008, 02:30 PM »
Thanks for the input.

wilfrednilsen: WebDav looks interesting (I need to read more), but on DreamHost there seem to be potential issues with using it (regarding the unique / peculiar way they set up users, is you enable WebDav you loose the ability to FTP and SSH)


Allen: I knew that there must be some command-line magic, I'll read up on shell access - not something I've had cause to do before.

Sri: This is possible, and indeed the service is already installed on DreamHost. I tend to shy away from using it though, in favour of an installable application - perhaps I should rethink!



And to answer my own question with another alternative...

AceFTP (freeware, but not OSS) seems significantly more powerful than Filezilla, and allows for easy point and click, drag and drop moving and copying on remote servers.

allen

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,206
    • View Profile
    • Donate to Member
Re: FTP - How do I duplicate / copy remote folder?
« Reply #5 on: February 08, 2008, 03:29 PM »
For future reference--

With dreamhost, just make sure your user is set as Shell Account; then just open telnet. (or snag a copy of putty) and connect to your domain using your ftp user/pass combo.

cp -r foldername copyname
« Last Edit: February 08, 2008, 03:31 PM by allen »

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Re: FTP - How do I duplicate / copy remote folder?
« Reply #6 on: February 08, 2008, 10:37 PM »
Poderosa is a better SSH client IMO, has tabs.

I tried using FileZilla, but felt it sucks compared to FlashFXP. I'll give AceFTP a try.
<a href="https://sridharkatakam.com">My blog</a>

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: FTP - How do I duplicate / copy remote folder?
« Reply #7 on: March 11, 2008, 02:29 PM »
then just open telnet.


Noooooooooooooooooooooooooooooooooooooooooooooooo never use Telnet. It is insecure. Use and SSH connection, and as Allen said, get PuTTY so you can do it (and other SSH-related stuff).

I am going to go one step further and say that you shouldn't be relying on a simple copy for various reasons, to include inefficiency and it is not transactional (i.e. I can fail partially).

I understand there are levels of tackling this type of thing and some of them may be overkill in many (if not most) cases, however... I still suggest you look into using version control. Your Dreamhost account already has subversion. I can elaborate if desired, but the quickie explanation is that you can work on a local copy, commit it in to svn, check it out on the test server, test it, make any changes, commit it to svn, check it out on the production server.

I would make this SOP and create the necessary batch/scipts to support this. You can then just modify the constants to account for changing usernames, passwords, host names, etc.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: FTP - How do I duplicate / copy remote folder?
« Reply #8 on: March 12, 2008, 09:17 AM »
What tinjaw said.

And please tell me that dreamhost doesn't allow telnet access.
- carpe noctem

Ampa

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
  • I am cute ;)
    • View Profile
    • MonkeyDash - 2 Player strategy boardgame
    • Donate to Member
Re: FTP - How do I duplicate / copy remote folder?
« Reply #9 on: March 14, 2008, 08:50 PM »
Update...

AceFTP is now annoying me, it continues to pop-up a reminder that I am using the free version (not the Pro version), even though I visited the site, and registered as a user of the free version (not the Pro version), and declined the offer to buy the Pro version (cos I want the free version!).

It also has an in-application advert, permanently reminding me that there is a Pro version... just in case I hadn't got the message by now!

Subversion... OK so maybe I do need to take the plunge and play with the big boys. I asked the Dreamhost super-happy-svn-installing robot to make me a subversion install, which it did (happily). I installed TortoiseSVN on my home machine. I even created an empty SVN repository...

...but now I am stuck (couldn't import my files successfully), lost and faced with a 126 page help file full of long words that I don't really understand.

Anyone have a nice basic guide / tutorial that will get me up and running?

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: FTP - How do I duplicate / copy remote folder?
« Reply #10 on: March 15, 2008, 03:13 AM »
Anyone have a nice basic guide / tutorial that will get me up and running?

Your main reference should be the red bean book. I would suggest you read the Preface, Chapter 1, and Chapter 2. You can worry about the rest later on as they are more advanced topics. That book will use the command line client. I suggest you use that and follow along, but that you should switch to TortoiseSVN after you have gone through those chapters. The TortoiseSVN help file will make much more sense then.