1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Moving a Website

Discussion in 'Site & Server Administration' started by JohnScott, Oct 5, 2015.

  1. #1
    We have a website hosted on a dedicated server in the US. The client wants to move the website to a server in Japan.

    If things were simple, we could just ftp all the contents from one server to the other. But, things are not simple.

    The Japanese server has a new version of the website on it. New database architecture. So everything gets moved the hard way.

    Problem is, this site has been in business for a decade or so and retains all customer pro formas and actual invoices in PDF form on the website. This folder is huge.

    And as sales activity is ongoing, the system creates and rewrites PDFs all day long.

    Suspending sales activity in order to move the site is bad enough, but it seems the move will take especially long due to the size of the PDF's.

    So I had an idea. And since I know little about these things, I want expert opinion on my idea.

    Instead of moving directly to the new server with its new database architecture, why not set up the new website (new database and everything) on the old server as a different account. (E.g. maindomain.com is old site, add maindomain1.com as new website in order to set up the new db and everything.)

    Then you could just go in via ssh and move or copy all the maindomain.com PDFs from maindomain.com to maindomain2.com without any actual data transfer.

    Then, once everything is working ok with new db on maindomain2.com, delete maindomain.com account and rename maindomain2.com to be maindomain.com

    And with the database conflict thus resolves, move the entire site (instead of moving it piecemeal) onto the new server at once.

    I was thinking this idea minimizes the time that sales must be suspended.

    I could be way off. I know nothing about these things.
     
    Solved! View solution.
    JohnScott, Oct 5, 2015 IP
  2. #2
    If it's writing static PDF files that don't change once they are written out (I would assume the system isn't constantly making changes to historical invoice PDFs), you could use something like scp to just copy the contents of a directory from one server to another (assuming you have shell access to both servers).

    For example, if you wanted to copy a directory of /home/site1/pdf/ from the old server to the /home/newsite/pdf/ directory on the new server as the root user you would do something like this:

    scp -r /home/site1/pdf/ root@newserveripaddress:/home/newsite/pdf/
    Code (markup):
    I assume going direct server to server is going to be faster than downloading them all and then uploading them all.

    Now if you want to get fancy and set up a system to keep the PDFs on both servers in sync (basically just copying changes every time you run it), you would want to look at setting up rsync on the new server. See: http://linux.die.net/man/1/rsync
     
    digitalpoint, Oct 5, 2015 IP
    JohnScott and webtalk like this.
  3. JohnScott

    JohnScott Notable Member

    Messages:
    862
    Likes Received:
    285
    Best Answers:
    0
    Trophy Points:
    250
    #3
    Awesome, thanks for the guidance! rsync looks to be exactly what we needed!
     
    JohnScott, Oct 5, 2015 IP