Reputation: 11588
I'm currently migrating a Magento installation to a new, separate server and I was wondering whether there's any method I could use apart from an FTP program like FileZilla. The backup size is around 4GB - so this would take hours to download and upload to the new location.
Is there any way of copying/moving files between servers? I looked at PHP's FTP functionality, but I'm unsure if this is the right way to go. I tried searching for previous questions, but all I found was Python and C++ solutions which I'm not that comfortable using...
Upvotes: 0
Views: 374
Reputation: 19688
with ssh is much more simplier
tar -jcvf - /backup-directory | ssh user@destiny-server sh -c 'mkdir backup; cd backup; tar -jxvf -'
this sent compressed the stream in the network to make it more faster.
Upvotes: 0
Reputation: 19688
is posibbly between servers, but you need
tar and if you want, compress it. you could use native php extensions, or pear extensions.
So you need to uncompres
In the destiny server do a script what writes tar, here could be 2 scenarios.
Can connect directly to http $tar = new Archive_Tar('http://my-old-host.tld/archive.tar');
You need to download first. With curl http://www.webdigity.com/index.php?action=tutorial;code=45 or with pear http://pear.php.net/manual/en/package.http.http-download.php
then you unpack with pear Archive_tar (if you add compression, you need to add here too)
$tar = new Archive_Tar('http://my-old-host.tld/archive.tar'); $tar->extract(dirname(FILE).'/backup_from_server/');
The most easy HTTP compatible way that i think. have a nice day.
Upvotes: 0
Reputation: 2101
Yes, with SSH
and scp
Assuming that you have ssh access (on both servers) and are working on linux machines, you can login to the old server via ssh and then use scp
:
scp /path/to/backup.tar.gz [email protected]:/path/on/new/server
Upvotes: 1
Reputation: 360792
tar cfz - /path/to/your/data|ssh [email protected] echo > oldserver.tar.gz
Upvotes: 3