Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Is this possible?

Options
  • 07-06-2002 8:17pm
    #1
    Registered Users Posts: 15,439 ✭✭✭✭


    2 seperately hosted sites...

    Need to do this...

    1)Site 1 connects to Site 2 ...chmods phpmyadmin to 755 ..
    2)Connects to a mysql database
    3)Downloads a backup of it (gzip would be preferable) to itself
    4)Site1 chmods Site2 phpmyadmin directory back to 600

    Is it possible to write a script that will do this at regular intervals, eg every 12/24 etc hours?

    Anyone got a sript that will do this, or suggestions as to where to start looking?

    Have a weather station?, why not join the Ireland Weather Network - http://irelandweather.eu/



Comments

  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    How's aboot server1 zips the DB at 0600, and server2 downloads the file at 0700?
    You shouldn't really need to go switching modes etc.

    If you want something a bit more robust, you could use JMS, but FTP would do the trick. You could use RMI to trigger the download after it's finished zipping too if you wanted instead of scheduling it for an hour after.

    "man cron" for info on scheduling, if you're using *nix that is.


  • Registered Users Posts: 7,412 ✭✭✭jmcc


    Originally posted by Enygma
    How's aboot server1 zips the DB at 0600, and server2 downloads the file at 0700?
    You shouldn't really need to go switching modes etc.

    If you want something a bit more robust, you could use JMS, but FTP would do the trick. You could use RMI to trigger the download after it's finished zipping too if you wanted instead of scheduling it for an hour after.

    "man cron" for info on scheduling, if you're using *nix that is.

    As Enygma says. MySQL allows you to dump tables and data using the 'mysqldump' command. You could then just gzip or zip these into a file. Using a cronjob would be the best way to do it.

    Regards...jmcc


Advertisement