Gossamer Forum
Home : General : Perl Programming :

perl and ftp. Your advice, please

Quote Reply
perl and ftp. Your advice, please
I need to move a huge database file from one server to another. Rather than ftp the file from the old server, onto my computer, then onto the new server, I'd prefer to ftp it directly between the servers. I remember once seeing a short perl script (only a few lines) that could do just that. The script was run command line. Does anyone know how this is done? If not, are there any any other ways of moving the files between servers? Thanks! Katina
Quote Reply
Re: [Katina] perl and ftp. Your advice, please In reply to
wget via Telnet/SSH?

From the old server, you would use something like this;

mysqldump --add-drop-table -uUSERNAME -pPASSWORD DATABASE_NAME > full_backup.sql
gzip -c full_backup.sql > full_backup.sql.gz

...to make a dump of your database.

wget http://www.yoursite.com/full_backup.sql.gz

There are a few options with wget:

wget --help

...gives a list of flags.

Hope that helps.


Andy (mod)
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Katina] perl and ftp. Your advice, please In reply to
Check out the Net::FTP module - it should have what you need. If you want a more secure method, I would suggest using SSH and the Expect module or, even better, rsync via SSH.


s/(\d{2})/chr($1)/ge + print if $_ = '8284703280698276687967';