Development Automatic File Mirroring?

Discussion in 'Software' started by jezmck, 20 Jul 2005.

  1. jezmck

    jezmck Minimodder

    Joined:
    25 Sep 2003
    Posts:
    4,456
    Likes Received:
    36
    Hi,
    is it possible to automatically mirror a file from another server on my own?
    Is that the kind of thing Cron jobs can do? (Only needs to run daily, 12hr-ly to be safe.)

    I'd also like to transform the (XML) file at some point (got the XSLT already) and was wondering if that could be done at the same time. (not a major problem if not)

    TIA, j
     
  2. ST8

    ST8 What's a Dremel?

    Joined:
    14 Feb 2003
    Posts:
    596
    Likes Received:
    0
    Which os are you running? IF nix check out rsync in conjunction with cron, if windows its prolly easier to use something like xcopy and a scheduled task. There is a windows port of rsync but it aint fast :)
     
  3. jezmck

    jezmck Minimodder

    Joined:
    25 Sep 2003
    Posts:
    4,456
    Likes Received:
    36
    it's linux, but not my server - is my hosting with www.prokmu.com
    (I guess I should ask them, but I'm not confident they'll know themselves tbh)
     
  4. jezmck

    jezmck Minimodder

    Joined:
    25 Sep 2003
    Posts:
    4,456
    Likes Received:
    36
    any other thoughts anyone?
     
  5. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
    hmm i made a script ages ago which tracked players on NS servers (tracked just our clan + friends + the guy know as confidence), now the box that was running the website had cpanel, and through that i made cron run a PHP script every 5 minuites :D

    Now while i checked with the hosting people if that was okay (because it wouldn't of come out of my mates bandwidth, the way they log bandwidth) i had access to do that just on a regular cpanel account. How about that?
     
  6. jezmck

    jezmck Minimodder

    Joined:
    25 Sep 2003
    Posts:
    4,456
    Likes Received:
    36
    yeah, definately!
    sounds like what I need.

    I currently know nothing of cron, so if you can tell me how to use that too I'd be extremely grateful. (I can of course see how to select frequency etc, but don't know how the command to run should be entered)
     
  7. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
    well cron and howto in google work quite well.
    (tbh linux admin = google("%i HOWTO");)

    In short you have cron tabs. Tasks. Cron is a periodic task shecdualar. So you will just do the command /usr/sbin/php ~/script.php

    where the first one is the path to the php binary, and the second param the script your going to run with it. Simple eh?
     
  8. jezmck

    jezmck Minimodder

    Joined:
    25 Sep 2003
    Posts:
    4,456
    Likes Received:
    36
    lol, fair point.
    i've not used *nix beyond a couple of crap lectures a coupla years ago, so wasn't sure if there'd be more to it.

    I still need help with the file copying though.
     
  9. MrWillyWonka

    MrWillyWonka Chocolate computers galore!

    Joined:
    25 Jul 2004
    Posts:
    5,892
    Likes Received:
    12
    I used a program earlier this year for a few months to transfer files at certain times, with plenty of options - program is vice versa pro, dang, google's down again! Google it and you should find it. Its a 30 day trial version, but I got my copy from my school!
     
  10. jezmck

    jezmck Minimodder

    Joined:
    25 Sep 2003
    Posts:
    4,456
    Likes Received:
    36
    that's not what I need - I need it for work, and it must run from the server so it doesn't matter if I'm in transit.
     
  11. MrWillyWonka

    MrWillyWonka Chocolate computers galore!

    Joined:
    25 Jul 2004
    Posts:
    5,892
    Likes Received:
    12
    You can run the program from the server, you can also run it from the client if you want to.
     

Share This Page