copy data server to server

Started on the old forum in December 2010 · view the original in the archive · old links redirect here

8 replies · 558 views · started 15 years ago · 1 min read

3 participants
jatt1 Newbie · 6 posts #1

heloooo friends anyone plz help me anyone know simple way to copy all data old server to new server any script or soft u know plzz tell me i want to copy my data into new server plz help meeeee

frostymarvelous Senior · 266 posts #2

Make a backup and move it over.

Ur host should offer that service. Most do.

Perfection comes at a cost

I accept liberty!

jatt1 Newbie · 6 posts #3

sir hostgrator ask give me 37$ per hour to copy data plzzz help meeee tell another way

GiLL Senior · 356 posts #4

jatt1 wrote: sir hostgrator ask give me 37$ per hour to copy data plzzz help meeee tell another way

can i ask you ? your old site or data is on shared hosting or a vps or dedicated server did you buy shared hosting from hostgator or vps / dedicated server ?

if both account old and new is on shared hosting you need to make zip or tar all of your data then use copy command or script on new site and it will copy tar or zip files from old to new server

php code could be some thing like

//original file
$img = "http://www.site.com/backup.zip"; 
 
//directory to copy to (must be CHMOD to 777) 
$copydir = "/home/user/public_html/directory/"; 
 
$data = file_get_contents($img); 
$file = fopen($copydir . "backup.zip", "w+"); 
fputs($file, $data); 
fclose($file);

instead of fopen,fread, etc... you can use

$path = "/path/to/save/to/";
$final_image = $path . $filename_name;
copy($filename,$final_image);

left wap stuff

jatt1 Newbie · 6 posts #5

verr gill i cant extract .tar file in shared hosting of hostgrator plz help me how i can extract it ???

GiLL Senior · 356 posts #6

i am not familiar with hostgator do they allow shell ? try this method note you need to edit as your link

<?php 
$mstrng = shell_exec('/path/to/tar -tzvf /local/home/username/public_html/myfiles/myfile.tar.gz');
echo $mstrng; 
?>

left wap stuff

jatt1 Newbie · 6 posts #7

no bro this is not working plz help me

Added after 20 minutes:

thankssssssss verr g thanku soooooo much

GiLL Senior · 356 posts #8

Nice to see you have done it but i checked there using cpanel legacy file manager you can untar also

left wap stuff

frostymarvelous Senior · 266 posts #9

When you make a backup, you can manually extract each file into a new folder, while maintaining your folder structure. Go into that folder and select all including your index and then zip it. This should be extractable in you new server. Remember that zipping the new folder will give you hell as when you extract, the public html will contain that folder. so go into it and select the files instead.

Perfection comes at a cost

I accept liberty!

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close