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
Jul 20, 2004, 9:39 AM
Veteran / Moderator (18436 posts)
Jul 20, 2004, 9:39 AM
Post #2 of 3
Views: 3552
wget via Telnet/SSH?
From the old server, you would use something like this;
gzip -c full_backup.sql > full_backup.sql.gz
...to make a dump of your database.
There are a few options with wget:
...gives a list of flags.
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
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!
From the old server, you would use something like this;
Code:
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.
Code:
wget http://www.yoursite.com/full_backup.sql.gzThere are a few options with wget:
Quote:
wget --help...gives a list of flags.
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
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!