Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2002
    Location
    Behind your monitor.
    Posts
    569

    best way to move a filesystem to another server - frequently

    Hi all,

    What do you think is the best way to move a filesystem nightly to another server to mirror the filesystem?

    I was thinking along the lines of writing a script to make a tar.gz, move it to a web accessable directory, then using wget on the other machine to obtain the archive, then another cron job to extract the archive.

    However perhaps this is the hard way to do it?

    I was wondering if maybe rsync could verify if the filesystem on the source server had changed and if so then make the archive, send it to the destination server,and extract it.

    I amopen to any suggestions or methods anyone might have.

    Thanks!
    GlowHost → Affordable Managed Web Hosting Since 2002.
    ۪Cloud Servers- Hot Failover + Clustered Storage
    ¬Managed Dedicated Servers - Semi-Dedicated Servers
    ۪Shared & Reseller packages - 20 Min Ticket Response - 24/7/365 Phone & Live Chat

  2. #2
    Join Date
    Mar 2004
    Posts
    66
    I was wondering if maybe rsync could verify if the filesystem on the source server had changed and if so then make the archive, send it to the destination server,and extract it.
    yes, you can use rsync, but not for making the archive.
    rsync will copy to remote server entire directory structure and has the advantage it uses less bandwidth than tar->wget, transferring all data only the first time it is used and then syncing only differences.

    of course this can be automated by cron

  3. #3
    Join Date
    Sep 2002
    Location
    Behind your monitor.
    Posts
    569
    rsync seems to be the way to go then. Anyone ever done this successfully on a cpanel box without breaking things?
    GlowHost → Affordable Managed Web Hosting Since 2002.
    ۪Cloud Servers- Hot Failover + Clustered Storage
    ¬Managed Dedicated Servers - Semi-Dedicated Servers
    ۪Shared & Reseller packages - 20 Min Ticket Response - 24/7/365 Phone & Live Chat

  4. #4
    Join Date
    Mar 2003
    Location
    Sioux Falls, SD
    Posts
    1,282
    nfs would work too. Depending on your situation, it might be better. Especially if the machines are on the same local lan segment. Watch out for security though if they data will be travelling over the public internet. I'd suggest using a 2nd nic to the switch and put them in the same vlan. NFS would work well in that situation.
    James Cornman
    365 Data Centers - AS19151/AS29838
    Colocation • Network Connectivity • Managed Infrastructure Services

  5. #5
    Join Date
    Sep 2002
    Location
    Behind your monitor.
    Posts
    569
    I think we will be going with rsync. has anyone set this up before?

    I have it untarred, and then

    make
    make install

    so it is ready to go but all the docs say there needs to be a congig file in /etc/rsyncd.conf to run it as a daemon, yet installing it did not place this file there. Does it have to be made from hand or is my install bad?
    GlowHost → Affordable Managed Web Hosting Since 2002.
    ۪Cloud Servers- Hot Failover + Clustered Storage
    ¬Managed Dedicated Servers - Semi-Dedicated Servers
    ۪Shared & Reseller packages - 20 Min Ticket Response - 24/7/365 Phone & Live Chat

  6. #6
    Go for rsync, don't forget to give the correct parameter to save file permissions/owners

  7. #7
    Join Date
    Sep 2002
    Location
    Behind your monitor.
    Posts
    569
    Yep am doing. I have the two servers taking to each other.

    If anyone finds this thread usefull, make sure when running the --delete argument that you do a dry run first. I deleted a lot of things that were not supposed to be. I almost swallowed my gum when I saw the readout.

    Problem: Now I get a module listing of the remote server running as a daemon, but for some reason it will not copy the files. It says files transferred: 0

    I have yet to find out why.

    I will say I had rsync running on a local server and what a cool utility!

    It is great for our billing system which is on a staging platform, now when I am happy with a buld I can just run the proper command and have the updated files transferred over. What a time saver.

    Now if I can get it running for what I orriginally set off to do....

    Anyone know why or have any ideas why it will not copy the files to the client server?

    I can supply details as you need.
    GlowHost → Affordable Managed Web Hosting Since 2002.
    ۪Cloud Servers- Hot Failover + Clustered Storage
    ¬Managed Dedicated Servers - Semi-Dedicated Servers
    ۪Shared & Reseller packages - 20 Min Ticket Response - 24/7/365 Phone & Live Chat

Posting Permissions

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