Your HostICan Community  


Go Back   Your HostICan Community > HostICan Web Hosting > Virtual Private Servers (VPS)

Virtual Private Servers (VPS) Need help with your VPS plan on HostICan? Please feel free to ask and we'll give you the answers!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-30-2007, 10:16 PM
lnxcode's Avatar
The British Kid
 
Join Date: Sep 2007
Location: Richmond, VA
Posts: 1,772
Send a message via AIM to lnxcode Send a message via Skype™ to lnxcode
Default How to: Move files from provider A to Provider B quickly via SSH

Have you ever wanted to copy files from say like your godaddy account to your VPS? Well,
below is what you need to do if you ever get the urge to move files from Godaddy.com (or any other provider) to your account within /cpanel


1. Make sure you have a /cpanel account established within your VPS.
2. Do the following within SSH:

Code:
cd /home/<username-of-cpanel>/public_html &&
wget -q -nH --mirror ftp://user:pass@host &&
chown <username-of-cpanel>:<username-of-cpanel> *
for this section: ftp://user : pass@host make sure you replace:

user = username of your login at godaddy.com (or any other provider)
pass = password login for your FTP at godaddy.com (or any other provider)
host = hostname of your domain (yourdomain.com)

Also, please remember to replace <username-of-cpanel> with your actual cpanel username.

What does the above do?

The above will put you into your /home/username/public_html/, and it will copy and set ownership of all the files so you dont have to download and upload files via your PC you can do it directly server to server.
__________________
Thanks,

Denis Motova
Affiliate / Operations Manager

HostICan Answers | HostICan Newsletter | HostICan Blog | Become a HostICan Affiliate | Create a Support Ticket.
Reply With Quote
  #2 (permalink)  
Old 11-13-2007, 08:30 AM
thnet's Avatar
Member
 
Join Date: Oct 2007
Location: basement
Posts: 94
Default

Quote:
Originally Posted by lnxcode View Post
Have you ever wanted to copy files from say like your godaddy account to your VPS? Well,
below is what you need to do if you ever get the urge to move files from Godaddy.com (or any other provider) to your account within /cpanel


1. Make sure you have a /cpanel account established within your VPS.
2. Do the following within SSH:

Code:
cd /home/<username-of-cpanel>/public_html &&
wget -q -nH --mirror ftp://user:pass@host &&
chown <username-of-cpanel>:<username-of-cpanel> *
for this section: ftp://user : pass@host make sure you replace:

user = username of your login at godaddy.com (or any other provider)
pass = password login for your FTP at godaddy.com (or any other provider)
host = hostname of your domain (yourdomain.com)

Also, please remember to replace <username-of-cpanel> with your actual cpanel username.

What does the above do?

The above will put you into your /home/username/public_html/, and it will copy and set ownership of all the files so you dont have to download and upload files via your PC you can do it directly server to server.
That sure beats zipping sites on non-cpanel provider server, wget to HI, & zcat to cpanel userspace.. It gets all the content, but, how to get all the user accounts? Specifically, the former server assigns unique UID to the domain GID for every account, whether FTP, BASH, or email. Using webmin, it is possible to export a batch file containing the encrypted info from passwd & shadow: example: of 2 users on an account GID 583:

Code:
group:cronicles:$1$1ebMDMAU$H1Ja427wf1AhmgpqVPp0v1:746:583::/home/cronicles:/bin/ftponly:0:99999:7::
uaccount:qmgp475th:jmkgxJAIVbMhA:859:583::/home/qmgp475th:/bin/emailonly:0:99999:7::
in above example "cronicles" would correspond to the new cpanel account which would have already been added via whm, so, it can be skipped, but, when there are 1 or many email accounts (only "qmgp475th" shown here) how to import into whm or domain owner cpanel? cpanel seems to have mysql database to maintain the passwd & shadow info for secondary users in the group, rather than the "old way" of assigning UID to every user: how can the info be imported? The alternative, is to manually set up each account within the users cpanel, and assigning new password, or coordinating with the webmaster of the account that is being imported. It would be much more professional to be able to send the webmaster of the domain the "new cpanel" login, change the name server IP's, and have a relatively "seamless" transfer from a non cpanel server.
(this board needs more smilies -- like thumbs-up -- that would be )
Reply With Quote
  #3 (permalink)  
Old 11-14-2007, 04:13 AM
Banned
 
Join Date: Oct 2007
Posts: 142
Default

Quote:
cd /home/<username-of-cpanel>/public_html &&
wget -q -nH --mirror ftp://user: pass@host &&
chown <username-of-cpanel>:<username-of-cpanel> *

thanks inxcode

should i post this && in the command???
Reply With Quote
  #4 (permalink)  
Old 11-14-2007, 08:18 AM
lnxcode's Avatar
The British Kid
 
Join Date: Sep 2007
Location: Richmond, VA
Posts: 1,772
Send a message via AIM to lnxcode Send a message via Skype™ to lnxcode
Default

Yes, && says that there are more rows for linux, so it doesnt start the previous row.
__________________
Thanks,

Denis Motova
Affiliate / Operations Manager

HostICan Answers | HostICan Newsletter | HostICan Blog | Become a HostICan Affiliate | Create a Support Ticket.
Reply With Quote
  #5 (permalink)  
Old 11-14-2007, 08:31 AM
thnet's Avatar
Member
 
Join Date: Oct 2007
Location: basement
Posts: 94
Default

Quote:
Originally Posted by baghdad4ever View Post
thanks inxcode

should i post this && in the command???
the && allows you to combine commands on single line. (Also, should have switch -Rf after chown to make the command chown all the folders & files below it, because * only applies the chown to folders & files on the first level.

Code:
cd /home/<username-of-cpanel>/public_html && wget -q -nH --mirror ftp://user:pass@host && chown -Rf <username-of-cpanel>:<username-of-cpanel> *
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 02:50 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

Copyright © 2003 - 2008 HostICan. All Rights Reserved.