Solved

Changing hosts/servers.

Posted on 2003-11-29
26
591 Views
Last Modified: 2013-12-24
I have a site in development that has cgi/perl and php.
I want to transfer hosts and servers as the guy who set me up on this package has disappeared.

Will a new hosting company be able to do everything for me- transfer all files etc and keep the site at the same stage of development?

I don't know anything about cgi but i keep reading about how it has to be installed properly on servers - is this something i will need to watch for?

I have contol panel access.

Thanks
0
Comment
Question by:macuser777
  • 14
  • 9
  • 3
26 Comments
 
LVL 7

Accepted Solution

by:
kohashi earned 180 total points
ID: 9844118
Your host might be able to transfer them properly.  If you can still access the files, I suggest downloading everything that you can.

Perl needs to be configured properly to the right path.  A small header change on each script #!/usr/bin/perl in most cases works.  Just check with your new host about it.

Any decent host will have it properly installed and will be able to help you configure the scripts properly.

If you have a domain name, you will have to change the nameservers to your new host (most likely ns1.newhost.com and ns2.newhost.com).

hope that helps,
-kohashi
0
 
LVL 4

Author Comment

by:macuser777
ID: 9844148
Hi Kohashi,

That helps

I can access all the files and have made back up  of the home directory but it comes downloaded as a .tar.gz - which i can't get any joy from.

Still - i'm using cPanelX and if i go to another cPanelx provider i'm hoping they'll know some easy transfer protocol.

I'm going to see if i can get hold of a new host tomorrow - otherwise monday. So i'll keep the q. open till then in case something comes up.

If you have any special tips on using the CpanelX skin to help let know.

Thanks A Lot.
0
 
LVL 7

Expert Comment

by:kohashi
ID: 9844185
Well tar.gz is fine.  Make sure your host gives you shall access or has shell access.  You can then upload the tar.gz and unpack it right on the server into the same format.  Also, winzip can decompress it all, so you can use a normal FTP to upload everything again as well.

all the cpanel skins are the same in functionaility in my opinion.  It i just the way it is organized/layed out which differs and suits different people better.

hope that helps,
-kohashi
0
 
LVL 15

Assisted Solution

by:periwinkle
periwinkle earned 20 total points
ID: 9846465
Kohashi is correct - a tar.gz is a compressed 'tape archive' file, which is the Linux equivalent of 'pkzip' or 'winzip'.  As long as you are transferring to another Linux provider, you should be ok.

Do you have access to your domain registration record?  That is the one item that might cause you a few headaches in transferring if you don't have a login to the registrar, but it still is all doable, as long as you are listed as the domain registrant (the owner of the domain), preferably with your valid email address on the registrant and admin records.

Kohashi is correct that the most common CGI script tweak that you will have is the path to perl.  Also to check are the path to sendmail (or other mail program) if you use the program to send out email, and the paths to any files read or written to by the script.

Do you use a database backend as well?  You'll need to back that up, too.
0
 
LVL 4

Author Comment

by:macuser777
ID: 9846543
Hi

Thanks for the input :)

I just having a forum chat with e3servers.com

They do run Linux and cPanel, and i do have full access to the domain registration records fortunately - so i can quickly repoint the dns nameservers.

at e3 they said just changing the nameservers works in some cases if you're going from one cPanel host to another. So that's option1.

actually - here's all they said...

>>>>>>>>"Because you are using another cPanel server right now it might be able to transfer over all of your accounts automatically and you would just have to change nameserver information.  This works in a lot of cases, but if it doesn't then what you would have to do is this:  backup your site at the old cPanel server.  Then download the backup to your computer.  Create the site on our new server.  Then log into the new server and "Restore" the account.  This should move everything over in tact.  If this fails for some reason you would have to upload via ftp everything."

- only problem with that is that i can't get in touch with the current server.

Option 2 - upload .rar.gz backup is looking the most likely.

Option 3 - full ftp upload - PLEASE NO! - I didn't design the site

- i've been trying to work out if there's a way for me to ftp the site from cPanel into my Dreamweaver as another backup.
- trial and error so far has failed!

Hopefully i wont have to go that far - but it would be useful to know how if it's possible.


- Forgot to ask about shell access!


 

0
 
LVL 4

Author Comment

by:macuser777
ID: 9846589
I haven't been able to decompress the files with stuffit and haven't found a winzip for Mac yet -
0
 
LVL 7

Expert Comment

by:kohashi
ID: 9846895
I should have guessed you were on a mac, duh, i apologize.  Just upload the tar.gz (tarball gunzip) and ask your new host to decompress it.  That should be easiest.

hope that helps,
-kohashi
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 9847017
Kohashi -

D'oh - I didn't notice that either, when talking about winzip.  I believe that StuffIt will also understand gziped and tar'ed files, fwiw.
0
 
LVL 4

Author Comment

by:macuser777
ID: 9847031
hi Koashi,

no problem.
stuffit says it can handle .rar files but i've always had trouble with it - in fact i've never opened one successfully.

Anyway - i just got a forum message from e3servers - they said  they'd get on of their tecxperts to use their shell access to get me going if the site doesn't transfer automatically with a dns change or i can't get the upload going from my end.

Thanks for mentioning about the shell - i never would've known to ask.

They seem like a good co. - well rated on alexa and excellent forum for pre-sales.

I just signed up - i'll know if all's well by this time tomorrow at the latest hopefully.

I'm just paranoid about losing the backup now - i've downloaded it about 5 times already today. I tried storing a copy on email address but the file's too big! (Knew i should have ordered that usb key earlier - come on Amazon!)

I'll let you know.
macuser
0
 
LVL 4

Author Comment

by:macuser777
ID: 9847038
doh! me now - it's .tar not .rar!
0
 
LVL 7

Expert Comment

by:kohashi
ID: 9847041
If you need a remote backup, I can help you with that (assuming it is a reasonable size)

please email me at kevin #$ at *& kztech ))dot(( net.


the shell access is very useful.  You can use 'wget' and just grab files instantly.  Lots of cPanel providers knowingly (or unknowingly) allow you to use shell access.  Many commands are disabled, but you can still use enough to make it useful.

hope that helps,
-kohashi

periwinkle - two highest rated experts cannot read properly...  do you also find that a bit amusing?  :-D
0
 
LVL 4

Author Comment

by:macuser777
ID: 9847080
That's a very kind offer Kohashi, thanks

>please email me at kevin #$ at *& kztech ))dot(( net.

the email add. came thru a bit garbled unfortunately.
Not to worry - it's pretty late here.

I'll be at another computer tomorrow and i'll download a copy there as well in the morning.
I'm sure it'll all work out :)

macuser
0
 
LVL 7

Expert Comment

by:kohashi
ID: 9847114
i put characters to block email harvesters.  Remove the characters and you will get my email.  Replace at with '@' and dot with '.'

-kohashi
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 4

Author Comment

by:macuser777
ID: 9848851
Morning kohashi,

I took you up on the remote back up  after all just now.
My new host still isn't up and i'm delayed getting to my other location. Its 5.1 MB .tar.gz

Thanks
macuser
0
 
LVL 7

Expert Comment

by:kohashi
ID: 9850070
I have backed up your site on www.ohashi.us, please check your email for the exact URL.

-kohashi
0
 
LVL 4

Author Comment

by:macuser777
ID: 9852326
:D

Thanks kohashi,

I just got back in and caught up on emails - brilliant - thanks - that's really good of you - the link is up and available on your host.

My new servers haven't come on line yet - i'll keep you posted.
macuser

0
 
LVL 7

Expert Comment

by:kohashi
ID: 9853993
:)  You have all our best wishes, good luck!

-kohashi
0
 
LVL 4

Author Comment

by:macuser777
ID: 9855201
Good news!

e3servers.com did all the transfer for me. It took some time to get the server package online (1st of the month is a busy time apparently) - about 22 hrs - but then only a couple of hours to work out the transfer through their helpdesk.

I've just repointed the site to new servers.

All seems well :---)

Such was my desire to take control of my site(s - no future hair loss) that i signed up for a multi domain package with WHM.

V.v.v.v. late here - i'll check everything in light of day tomorrow..... night all - (this site rocks!)
macuser
0
 
LVL 4

Author Comment

by:macuser777
ID: 9856922
Progess report :)

I have cPanel access through my new host - but the old one is still active.

Changes made in the file manager of the new CPanel have no effect but do still in the old one.

I guess this is new nameserver propogation - right?

Last thinh i need to do is change passwords.
Is it ok to do this while site is in transit like this?

INTERESTINGLY - I think

The whole transfer was facilitated i think by running a script called "pkgacct"
which pooped up in my old current folder but didn't appear in my new cPanel file manager folder.

It's copyrighted - i'm only putting it here to see if i'm right - if iam i think it would be a handy script to purchse/enable (its by the same people who made WHM and can be bundled in somehow)
0
 
LVL 4

Author Comment

by:macuser777
ID: 9856928
#!/usr/bin/perl
# cpanel8 - scripts        Copyright(c) 1997-2002 DarkORB Communications Inc.
#                                 All rights Reserved.
# nick@darkorb.net      http://cpanel.net
# This code is subject to the cpanel license. Unauthorized copying is prohibited
require 5.006;

$|=1;

$isinc = $ENV{'INCBACKUP'};
$user = $ARGV[0];

chomp($system = `uname -s`);

$dotbuffer = '/scripts/dotbuffer';
if (! -e "/scripts/dotbuffer") {
   my $tmpdir = (getpwuid($>))[7] . "/tmp";
   if (-f "$tmpdir") {
      print "$tmpdir is a normal file.  Please remove it and try again\n";
      sleep(5);
      exit;
   }
   mkdir($tmpdir,0700);
   open(DOTBUFFER,">$tmpdir/dotbuffer");
   print DOTBUFFER < == 0 && (!($isbackup))) {
   system("rdate","-s","rdate.darkorb.net");
}

$0 = "pkgacct - ${user}";

if (!getpwnam($user)) {
   print "Invalid Account\n";
   exit;
}

$homedir = (getpwnam($user))[7];

if (-l $homedir) {
   $homedir = readlink($homedir);
}

open(CPU,"/var/cpanel/users/${user}");
while() {
   if (/^DNS=(\S+)/) {
      $dns = $1;
   }
}
close(CPU);

if($dns eq "") {
   print "Unable to find domain name for $user\n";
   exit;
}

open(CPU,"/var/cpanel/users/${user}");
while() {
   if (/^DNS\d*=(\S+)/) {
      push(@DNS,$1);
   }
}
close(CPU);



if ($prefix eq "" && ($tarroot eq "/home" || $tarroot eq getmntpoint())) {
   print "Bailing out .. no prefix set and tarroot is /home\n";
   exit;
}



if ($prefix ne "") {
   if (-d "${tarroot}/${prefix}${user}" && ! -l "${tarroot}/${prefix}${user}") {
      if (!$isinc) {
         system("rm","-rf","${tarroot}/${prefix}${user}");
      }
   }
   if (-f "${tarroot}/${prefix}${user}.tar.gz" && ! -l "${tarroot}/${prefix}${user}.tar.gz")
   {
      system("rm","-rf","${tarroot}/${prefix}${user}.tar.gz");
   }
}

if (!$isinc) {
   open(CPM,">${tarroot}/${prefix}${user}.tar.gz");
   close(CPM);
   chmod(0600,"${tarroot}/${prefix}${user}.tar.gz");
}

if (! -e "${tarroot}/${prefix}${user}") {
   mkdir("${tarroot}/${prefix}${user}",0700);
   mkdir("${tarroot}/${prefix}${user}/cp",0700);
   mkdir("${tarroot}/${prefix}${user}/logs",0700);
   mkdir("${tarroot}/${prefix}${user}/mysql",0700);
   mkdir("${tarroot}/${prefix}${user}/mm",0700);
   mkdir("${tarroot}/${prefix}${user}/mma",0700);
   mkdir("${tarroot}/${prefix}${user}/mma/pub",0700);
   mkdir("${tarroot}/${prefix}${user}/mma/priv",0700);
   mkdir("${tarroot}/${prefix}${user}/va",0700);
   mkdir("${tarroot}/${prefix}${user}/fp",0700);
   mkdir("${tarroot}/${prefix}${user}/vf",0700);
   mkdir("${tarroot}/${prefix}${user}/cron",0700);
} else {
   if (!$isinc) {
      print "${tarroot}/${prefix}${user} exists, please remove it and try again\n";
      exit;
   }
}



print "Copying Mail files....";
foreach $domain (@DNS) {
   next if (! -e "/etc/valiases/${domain}");
   if ($isinc) {
      system("rsync","-a","/etc/valiases/${domain}","${tarroot}/${prefix}${user}/va");  
   } else {
      system("cp","/etc/valiases/${domain}","${tarroot}/${prefix}${user}/va");  
   }
}
foreach $domain (@DNS) {
   next if (! -e "/etc/vfilters/${domain}");
   if ($isinc) {
      system("rsync","-a","/etc/vfilters/${domain}","${tarroot}/${prefix}${user}/vf");  
   } else {
      system("cp","/etc/vfilters/${domain}","${tarroot}/${prefix}${user}/vf");  
   }
}
print "Done\n";

if (-e "/usr/local/frontpage/www.${dns}:80.cnf") {
   print "Copying frontpage file....";
   if ($isinc) {
      system("rsync","-a","/usr/local/frontpage/www.${dns}:80.cnf","${tarroot}/${prefix}${user}/fp");
   } else {
      system("cp","/usr/local/frontpage/www.${dns}:80.cnf","${tarroot}/${prefix}${user}/fp");
   }
   print "Done\n";
}

print "Copying proftpd file....";
if ($> == 0) {
   system("cp","/etc/proftpd/${user}","${tarroot}/${prefix}${user}/proftpdpasswd");
} else {
   system("/usr/local/cpanel/bin/ftpwrap DUMP 0 0 >> ${tarroot}/${prefix}${user}/proftpdpasswd");
}
print "Done\n";

if ($ENV{'pkgacct-logs'} eq "yes" || $ENV{'pkgacct-cpbackup'} eq "") {
   print "Copying www logs....";
   foreach $domain (@DNS) {
      if ($pid = fork()) {
         my $dotcount = 5;
         while(waitpid($pid,1) != -1) {
            if ($dotcount % 5 == 0) {
               print ".........\n";
            }
            sleep(1);
            $dotcount++;
         }
      } else {
         $0 = "pkgacct - ${user} - log copy child";
         system("cp /usr/local/apache/domlogs/${domain}* ${tarroot}/${prefix}${user}/logs 2>/dev/null");
         system("cp /usr/local/apache/domlogs/www.${domain}* ${tarroot}/${prefix}${user}/logs 2>/dev/null");    
         system("cp /usr/local/apache/domlogs/ftp.${domain}* ${tarroot}/${prefix}${user}/logs 2>/dev/null");
         exit;
      }
   }
   print "Done\n";
}

my $mysqladmin = find_mysqladmin();



my($mysqldatadir) = '/var/lib/mysql';
open(MADMIN,"$mysqladmin variables|");
while() {
   s/\|//g;
   if(/[\s\t]+datadir[\s\t]+(\S+)/) {
      $mysqldatadir = $1;
   }
}
close(MADMIN);
while(-l $mysqldatadir) {
   $mysqldatadir = readlink($mysqldatadir);
}


if ($ENV{'pkgacct-mysql'} eq "yes" || $ENV{'pkgacct-cpbackup'} eq "") {

   print "Grabbing mysql dbs...";
   my($mysqluser) = $user;
   $mysqluser =~ s/-//g;
   if ($> == 0) {
      if ($system =~ /freebsd/i) {
         system("cp -Rp $mysqldatadir/${user}_* ${tarroot}/${prefix}${user}/mysql 2>/dev/null");
         system("cp -Rp $mysqldatadir/${user} ${tarroot}/${prefix}${user}/mysql 2>/dev/null");
         system("cp -Rp $mysqldatadir/${mysqluser}_* ${tarroot}/${prefix}${user}/mysql 2>/dev/null");
         system("cp -Rp $mysqldatadir/${mysqluser} ${tarroot}/${prefix}${user}/mysql 2>/dev/null");
      } else {
         system("cp -a $mysqldatadir/${user}_* ${tarroot}/${prefix}${user}/mysql 2>/dev/null");
         system("cp -a $mysqldatadir/${user} ${tarroot}/${prefix}${user}/mysql 2>/dev/null");
         system("cp -a $mysqldatadir/${mysqluser}_* ${tarroot}/${prefix}${user}/mysql 2>/dev/null");
         system("cp -a $mysqldatadir/${mysqluser} ${tarroot}/${prefix}${user}/mysql 2>/dev/null");
      }
   } else {
      my $users = `/usr/local/cpanel/bin/mysqlwrap LISTUSERS 0 0`;
      @DBS = split(/\n/,`/usr/local/cpanel/bin/mysqlwrap LISTDBS 0 0`);
      foreach $db (@DBS) {
         $db =~ s/\n//g;
         system("mysqldump -c -q -u${user} -p$ENV{'REMOTE_PASSWORD'} ${db} > ${tarroot}/${prefix}${user}/mysql/${db}.sql 2>/dev/null");
      }
      system("mysqldump -c -q -u${user} -p$ENV{'REMOTE_PASSWORD'} ${user} > ${tarroot}/${prefix}${user}/mysql/${user}.sql 2>/dev/null");
   }
   print "Done\n";

   print "Grabbing mysql privs...";
   if ($> == 0) {
      my $uid = (getpwnam($user))[2];
      system("echo \"$uid DUMPSQL 0 0\" | /usr/local/cpanel/bin/mysqladmin >>  ${tarroot}/${prefix}${user}/mysql.sql");
   } else {
      system("/usr/local/cpanel/bin/mysqlwrap DUMPSQL 0 0 >>  ${tarroot}/${prefix}${user}/mysql.sql");
   }
   print "Done\n";
}


print "Copying mailman lists....";
if ($system =~ /freebsd/i) {
   system("/bin/cp -Rp /usr/local/cpanel/3rdparty/mailman/lists/*_${dns} ${tarroot}/${prefix}${user}/mm 2>/dev/null");
} else {
   system("/bin/cp -a /usr/local/cpanel/3rdparty/mailman/lists/*_${dns} ${tarroot}/${prefix}${user}/mm 2>/dev/null");
}
print "Done\n";

print "Copying mailman archives....";
if ($system =~ /freebsd/i) {
   system("/bin/cp -Rp /usr/local/cpanel/3rdparty/mailman/archives/public/*_${dns} ${tarroot}/${prefix}${user}/mma/pub 2>/dev/null");
   system("/bin/cp -Rp /usr/local/cpanel/3rdparty/mailman/archives/public/*_${dns}.mbox ${tarroot}/${prefix}${user}/mma/pub 2>/dev/null");
   system("/bin/cp -Rp /usr/local/cpanel/3rdparty/mailman/archives/private/*_${dns} ${tarroot}/${prefix}${user}/mma/priv 2>/dev/null");
   system("/bin/cp -Rp /usr/local/cpanel/3rdparty/mailman/archives/private/*_${dns}.mbox ${tarroot}/${prefix}${user}/mma/priv 2>/dev/null");
} else {
   system("/bin/cp -a /usr/local/cpanel/3rdparty/mailman/archives/public/*_${dns}  ${tarroot}/${prefix}${user}/mma/pub 2>/dev/null");
   system("/bin/cp -a /usr/local/cpanel/3rdparty/mailman/archives/public/*_${dns}.mbox ${tarroot}/${prefix}${user}/mma/pub 2>/dev/null");
   system("/bin/cp -a /usr/local/cpanel/3rdparty/mailman/archives/private/*_${dns} ${tarroot}/${prefix}${user}/mma/priv 2>/dev/null");
   system("/bin/cp -a /usr/local/cpanel/3rdparty/mailman/archives/private/*_${dns}.mbox ${tarroot}/${prefix}${user}/mma/priv 2>/dev/null");
}
print "Done\n";

print "Copying homedir....";
open(NFILES,">${tarroot}/${prefix}${user}/nobodyfiles");
open(FIND,"find $homedir -user nobody|");
while () {
   s/^$homedir//g;
   print NFILES;
}
close(FIND);
close(NFILES);

if ($isbackup) {
   if ($isuserbackup) {
      system("rsync","-a","--exclude=/backup-*_*-*-*_${user}*","${homedir}/","${tarroot}/${prefix}${user}/homedir");
   } else {
      if ($isinc) {
         system("rsync","-a","--delete","$homedir/","${tarroot}/${prefix}${user}/homedir");
      } else {
         if ($system =~ /freebsd/i) {
            system("cp","-Rp","$homedir","${tarroot}/${prefix}${user}/homedir");
         } else {
            system("cp","-a","$homedir","${tarroot}/${prefix}${user}/homedir");
         }
      }
   }
} else {
   if ($system =~ /freebsd/i) {
      system("cp -Rpv $homedir ${tarroot}/${prefix}${user}/homedir | $dotbuffer 20");
   } else {
      system("cp -av $homedir ${tarroot}/${prefix}${user}/homedir | $dotbuffer 20");
   }
}
print "Done\n";

print "Copying cpuser file.......";
system("cp","/var/cpanel/users/${user}","${tarroot}/${prefix}${user}/cp");
print "Done\n";

print "Copying crontab file.......";
system("cp","/var/spool/cron/${user}","${tarroot}/${prefix}${user}/cron");
print "Done\n";

print "Copying quota info.......";
open(QUOTA,">${tarroot}/${prefix}${user}/quota");
open(QC,"/etc/quota.conf");
while() {
   if(/^${user}=(\d+)/){
      $quota = $1;
   }
}
close(QC);
print QUOTA "$quota";
close(QUOTA);
print "Done\n";


print "Storing Subdomains....\n";
@SUBS=listsubdomains(@DNS);

open(SH,">${tarroot}/${prefix}${user}/sds");
foreach $sd (@SUBS) {
   print SH "$sd\n";
}
close(SH);
print "Done\n";


print "Storing Parked Domains....\n";
@SDS=getparked(${dns});

open(SH,">${tarroot}/${prefix}${user}/pds");
foreach $sd (@SDS) {
   print SH "$sd\n";
}
close(SH);
print "Done\n";

print "Storing Addon Domains....\n";
my(@PSUBS);
my(%PN,%FN,$pname,$fname);

foreach(@SUBS) {
   $fname = $_;
   s/_/\./g;
   $FN{$_}= $fname;
   push(@PSUBS,$_);
}

my %PARKED = getmultiparked(@PSUBS);
open(SH,">${tarroot}/${prefix}${user}/addons");
foreach my $subdomain (keys %PARKED) {
   foreach my $parked (keys %{$PARKED{$subdomain}}) {
      print SH "$parked=$FN{$subdomain}\n";
   }
}

close(SH);
print "Done\n";

print "Copying password.......";
open(SH,">${tarroot}/${prefix}${user}/shadow");
my $pass = (getpwnam($user))[1];
print SH "$pass";
close(SH);
print "Done\n";


print "Copying shell.......";
open(SH,">${tarroot}/${prefix}${user}/shell");
my $shell = (getpwnam($user))[8];
print SH "$shell";
close(SH);
print "Done\n";


chdir("${tarroot}");
print "pkgacctfile is: ${tarroot}/${prefix}${user}.tar.gz\n";
print "Creating Archive ....";
if (!$isinc) {
   if ($isbackup){
      system("tar","pczf","${prefix}${user}.tar.gz","${prefix}${user}");
   } else {
      system("tar pczfv ${prefix}${user}.tar.gz ${prefix}${user} | $dotbuffer 3");
   }
   if (-d "${tarroot}/${prefix}${user}" && ! -l "${tarroot}/${prefix}${user}") {
      system("rm","-rf","${tarroot}/${prefix}${user}");
   }
}
print "Done\n";

if (!$isinc) {

   if ($system =~ /freebsd/i) {
      chomp($md5sum = `md5 -r ${tarroot}/${prefix}${user}.tar.gz`);
   } else {
      chomp($md5sum = `md5sum ${tarroot}/${prefix}${user}.tar.gz`);
   }
   $md5sum =~ /^(\S+)[\s|\t]*/;
   $md5sum = $1;

   print "md5sum is: $md5sum\n";

}


sub find_httpconf {
   my(@LOC,$loc);
   @LOC = ("/usr/local/apache/conf/httpd.conf",
         "/etc/httpd/conf/httpd.conf",
         "/usr/local/etc/apache/apache.conf");
   foreach $loc (@LOC) {
      if (-e $loc) { return $loc; }
   }
   return "";
}  




sub getparked {
   my($mydomain) = @_;
   my $httpdconf = find_httpconf();
   open(HTTPDCONF,"$httpdconf");
   $xu=0;
   while() {
      s/\>//g;

      if ($_ !~ /#/) {
         if (/\) {
      $_ =~ s/\n//g;
      if ($_ !~ /^;/) {
         if ($_ =~ /HOMEDIR/) {
            (undef,$homedir) = split(/ /, $_);
         }
         if ($_ =~ /HOMEMATCH/) {
            (undef,$homematch) = split(/ /, $_);
         }
      }
   }
   close(CONF);


   $disk = `df`;


   my $max = 0;
   my $mnt = "/";
   my(@DISK) = split(/\n/, $disk);
   my $addline = '';
   foreach $line (@DISK) {
      if ($line !~ /[\s|\t]+/) {
         $addline = $line;
         $addline =~ s/\n//g;
         next;
      }
      if ($line =~ /^\/dev/ || $addline ne "") {  
         $line =~ s/\n//g;

         $line =~ / (\d*)\s*\d*\%\s*(\S+)$/;
         my   $free = $1;
         my   $mount = $2;

         my   $assess = 1;
         if ( ($mount eq "/") && ($homedir eq 0) ) {
            $assess = 0;
         }
         $free = int($free);
         $max = int($max);

         if ( ($max < $free) && ($assess eq 1) && ($mount =~ /$homematch/ || $mount eq "/") ) {
            $max = $free;
            if ($mount eq "/") {
               $mount = $homedir;
            }
            $mnt = $mount;
         }
      }
   }

   if ($mnt eq "" || $mnt eq "/") { $mnt = '/home'; }
   return($mnt);

}

sub find_mysqladmin {
   my(@LOC,$loc);
   @LOC = ("/usr/bin/mysqladmin",
         "/usr/local/bin/mysqladmin");
   foreach $loc (@LOC) {
      if (-e $loc) { return $loc; }
   }
}



sub getmultiparked {
   my(@MYDOMAINS) = @_;


   my $httpdconf = find_httpconf();
   my %DR;
   my(%PARKED);
   my %SN;
   my $sn;
   my $sa;
   my $xu;
   my $mvh;
   my $vh;
   my %SA;

   open(HTTPDCONF,"$httpdconf");
   $xu=0;
   while() {
      s/\>//g;

      if ($_ !~ /#/) {
         if (/\) {
      s/\>//g;

      if ($_ !~ /#/) {
         if (/\
0
 
LVL 4

Author Comment

by:macuser777
ID: 9856961
0
 
LVL 7

Expert Comment

by:kohashi
ID: 9857946
It takes 24-72 hours for a domain to propogate to the new hosts.  After that time period the new site should be fully operational.

-kohashi
0
 
LVL 4

Author Comment

by:macuser777
ID: 9860252
Hiya - well the site's gone down while it propogates.

Should be ok - feel like i've taken a crash course in hosting last couple of days -
- in terms of picking a new host "it's a jungle out there"

If you don't mind i'll keep this thread open until the site comes up again - then we can clear out all the backups!

- looking forward to an early night...

thanks
macuser
0
 
LVL 4

Author Comment

by:macuser777
ID: 9883651
I'm Up! - thanks kohashi.
You can wipe the backup now.

:)

Macuser
0
 
LVL 7

Expert Comment

by:kohashi
ID: 9883748
good to hear :)  I will leave it for a while, maybe I will erase it another time when I need more space.

-kohashi
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 9884854
Thanks, macuser - glad to hear all is working well now!

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

What’s a web proxy server? A proxy server is a server that goes between clients and web servers, used in corporate to enforce corporate browsing policy and ensure security. Proxy servers are commonly used in three modes. A)    Forward proxy …
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now