Results 1 to 17 of 17
  1. #1
    Join Date
    May 2003
    Location
    Sweden
    Posts
    185

    Exclamation How do I sync data between servers?

    I have migrated to a new server and some data ended up on the old server (don't ask...). Now I need to sync the old data to the new server and I wonder what the easiet way to do that is (and yes, if you want to help me with it feel free to send a PM)

  2. #2
    ReliableSite.Net LLC - Offering Enterprise Grade Dedicated Servers Since 2006 [New York City metro / Miami, FL / Los Angeles, CA]
    Customers are our #1 priority - Read Our Reviews
    Need epic pricing on 1G and 10G unmetered? We have amazing deals and a 10 minute setup time! Click here to view incredible deals.

  3. #3
    Linux:
    Rsync - best solution. If you are looking for something automated then you can also use an ssh trust and have it run nightly.

    Windows:
    Robocopy - best solution. Command line tool that gives you the same type of options as rsync.
    - PlanetSudoku.com
    - Millions of Sudoku puzzles including Sudoku 9x9, Multi 2, Multi 4, and Samurai
    - Puzzles from Very Easy to Hard, Logical Solver, Custom Backgrounds, Learning Center, and more...

  4. #4
    Join Date
    May 2003
    Location
    Sweden
    Posts
    185
    Yes, but I am unfamiliar with how to set it up and seem to recall that using it on cPanel servers is not always a good idea?

  5. #5
    Join Date
    May 2009
    Posts
    312
    You can rsync the data over to the new server.

  6. #6
    Join Date
    May 2009
    Posts
    312
    Quote Originally Posted by Mortekai View Post
    Yes, but I am unfamiliar with how to set it up and seem to recall that using it on cPanel servers is not always a good idea?
    You can use rsync in cPanel server too. But you have to be careful about what files you want to or must say, needed to copy. Copy only the needed files from the old server to the new one.

  7. #7
    The good choice is rsyncing as it will not overwrite existing data but copies the data which is not in new server.

  8. #8
    Join Date
    May 2003
    Location
    Sweden
    Posts
    185
    Anyone know a good tech that could help with this?

  9. #9
    Join Date
    Dec 2010
    Location
    UK
    Posts
    80
    No need to pay a tech, just get something such as this going in a screen on the new server:

    Code:
    rsync -avhzS --stats --progress root@oldserver:/home/userold/ /home/usernew/

  10. #10
    Join Date
    Nov 2011
    Location
    Nasik, MH,INDIA
    Posts
    862
    You just need to shot following command for sync between two server.

    rsync -avz "directory path" root@yourserverIPorhostname:directory where you want to sync your data.

    I hope it's helpful for you.

  11. #11
    Join Date
    May 2003
    Location
    Sweden
    Posts
    185
    The problem seem to be that I have new data from today so syncing the old data from yesterday would not work?

  12. #12
    Join Date
    May 2003
    Location
    Sweden
    Posts
    185
    Just to clarify I need to move MySQL data and emails, not WWW content.

  13. #13
    Join Date
    Oct 2002
    Location
    Vancouver, B.C.
    Posts
    2,699
    rsync is only worthwhile if you already have a copy of data on the other server, and you just want to transfer over the differences. If you have to transfer over the whole thing, it will be a slow method of doing this.

    I would highly recommend using the tcputils package from the Debian project, to create a TCP connection between the two servers. If you're running a Debian based OS, install the package like this:
    Code:
    apt-get install tcputils
    or if you're running a different OS, grab the source here:
    http://ftp.de.debian.org/debian/pool....2.orig.tar.gz

    Then, tarball the files to stdout, piped over the TCP connection. This method is several times faster than rsync, regular scp, or even scp with compression enabled.

    http://www.webhostingtalk.com/showpo...1&postcount=16

    Once you have tcputils installed on both side, just do the following:

    destination:
    Code:
    tcplisten -r <port> | tar xzvf -
    source:
    Code:
    tar czvf - <files or folder> | tcpconnect -i <destination ip> <port>
    ASTUTE INTERNET: Advanced, customized, and scalable solutions with AS54527 Premium Performance and Canadian Optimized Network (Level3, Shaw, CogecoPeer1, GTT/Tinet),
    AS63213 Cost Effective High Performance Network (Cogent, HE, GTT/Tinet)
    Dedicated Hosting, Colo, Bandwidth, and Fiber out of Vancouver, Seattle, LA, Toronto, NYC, and Miami

  14. #14
    Join Date
    May 2003
    Location
    Sweden
    Posts
    185
    Would this work to sync the missing emails and datbase entries?

  15. #15
    Join Date
    Nov 2011
    Location
    Nasik, MH,INDIA
    Posts
    862
    What error are you getting while sync data on server ? Also let me know are you using any control panel ?

  16. #16
    Join Date
    May 2008
    Location
    Philadelphia, PA
    Posts
    250
    As most already said rsync is likely your best option:

    remote -> local
    rsync -avzr -e ssh user@host:/remote_directory /local_directory

    local -> remote
    rsync -avzr -e ssh /local_directory user@host:/remote_directory

    Where "a" is the archive flag which preserves permissions and ownership ect.
    Where "v" is for verbose output
    Where "z" is for compression
    Where "r" is for recursive rsync
    Where "-e ssh" explicitly specifies SSH protocol.
    Database By Design, LLC
    Philadelphia, PA Datacenter (401 North Broad)
    Premium Dedicated Server Hosting, Complex Hosting Solutions and Public/Private Cloud.
    866.488.7770 | Contact Us | www.databasebydesignllc.com

  17. #17
    What type of data is it? Are we talk database data or just normal files?

Similar Threads

  1. Sync data to backup server
    By cian1500ww in forum Dedicated Server
    Replies: 2
    Last Post: 07-06-2010, 07:55 AM
  2. How to sync data from old server?
    By Cyber404 in forum VPS Hosting
    Replies: 5
    Last Post: 04-19-2010, 04:19 AM
  3. Replies: 5
    Last Post: 10-25-2007, 12:44 AM
  4. Full data / user sync. between two cpanel boxes possible?
    By DataCentric in forum Hosting Software and Control Panels
    Replies: 4
    Last Post: 06-19-2006, 02:36 PM
  5. Replies: 6
    Last Post: 10-18-2004, 07:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •