Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 16th, 2000, 08:52 AM
KraZy TeAcheR KraZy TeAcheR is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 5 KraZy TeAcheR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Can any1 help me?
I have two sites,
1st - with cgi-bin, primary site
and 2nd with ftp access but without cgi-bin, but i need to back-up my files from 1st to 2nd. How can i connect to second'z site ftp server and post some files from 1st thru cgi/perl script... And i have only standart perl modules such socket and so on. Plz help me

Thanx
KraZy TeAcheR

Reply With Quote
  #2  
Old August 16th, 2000, 09:10 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I assume you are hosting your sites somewhere. Check with your 1st host and see if they have libnet-1.0703.tar.gz installed. You need FTP.pm.

Also,
1) depend on how much disk space you have on both Server1 and Server2.
2) Can you run cron on server1
3) how much data you want to backup

If no cron allowed, I would write a script which should do the following and to be executed daily/weekly or whenever.
1) Create a tarball of your Server1's site
2) Use FTP.pm and upload this tarball (using your system time as the tarball file name) to Server2
3) Then delete this tarball on your Server1

Anyway, if your 1st host has FTP.pm installed, you can grab libnet-1.0703.tar.gz from -> http://www.perl.com/CPAN-local/modules/by-module/Net/libnet-1.0703.tar.gz and read thru it and see how it works.

Using FTP.pm, you can even upload files from Server1 to GeoCities.

Reply With Quote
  #3  
Old August 16th, 2000, 09:15 AM
christucker2 christucker2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 81 christucker2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Use Net::FTP if it's installed (should be, it's part of the standard dist.). Check out perldoc Net::FTP for more details. Basically, you just create an FTP object and access everything through that. Examples are in the docs.

Reply With Quote
  #4  
Old August 17th, 2000, 03:35 AM
KraZy TeAcheR KraZy TeAcheR is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 5 KraZy TeAcheR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Damn,
how can i know what i have? At my other server i try to use command "perl -MFTP -e" in ssh-client but it says "no code specified for -e". So how can i know? May be thru some perl-script?

My server's other params

1st - 100mb/cgi/php/ssi
2nd - 32mb
3d - 20mb/cgi/ssi/(probably cron)/ssh

I need to back-up some filez ~3-8 mb size when no have many free space in 1st(or 3d)! So no need to use cron. Its no need to make tarball...

Thanx
KraZy TeAcheR

Reply With Quote
  #5  
Old August 17th, 2000, 05:34 AM
christucker2 christucker2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 81 christucker2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
You can tell whether a module is installed by typing:
perl -MModuleName
If the module isn't installed, you'll get an error message saying "Can't locate <ModuleName> in @INC: " and then a dump of your current @INC.

You can also try:
perl -MModuleName -e "print $ModuleName::VERSION"
to get the version of the module.

Note that ModuleName needs to be the FULL module name, not just the last bit -- i.e. when checking for Net::FTP then ModuleName is Net::FTP, not just FTP. If the module is not installed, you can always install it locally:
Go to CPAN (perl.com/CPAN) and download Net::FTP (or Net::Bundle). Follow the readme instructions to install it (use something like ~/perl/lib as your root).
Now, when you want to use the module, you can just add the line:
use lib "$ENV{HOME}/perl/lib";
before putting in
use Net::FTP


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Do any1 know how?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway