We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47217
    • 3 Posts
    Hi, im building a Website for a small association, so they decided to order the smallest Webhosting-Packet. This not includes any Cronjobs.
    Now im looking for a Backup solution.
    My thoughts are:
    - create a backup snippet (some finisched backup scripts from the internet)
    - run this snippet via a button or on every manager login

    Is this possible or are there other options to solve my problem?

    If my way is possible, how to create the snippet call on manager login / extra button?

    Hope you can help me..

    (sry 4 bad english)
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You could use a plugin to run a such a script. The plugin could run on any number of system events, from manager login to using the "clear cache" menu. Or you could create your own trigger as a Dashboard widget.

      If you are using Revolution, you could use the plugin/trigger to automatically run the Vapor script, creating a nice neat, installable package of the entire site. You could then have your script move the Vapor package from the core/packages directory to some storage place of your choice.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 47217
        • 3 Posts
        Thanks for your answer.
        Im not so good at PHP but i tried to get it work.
        If i execute Vapor by typing /vapor/vapor.php it works but i dont know how to call it via the Plugin.

        This:
        include '/pathToMyHost/htdocs/vapor/vapor.php' ;


        results in an error:

        PHP Fatal error: Cannot redeclare class modX in /pathToMyHost/htdocs/core/model/modx/modx.class.php on line 2501, referer: http://myPage.com/manager/index.php?a=30&id=12
        , referer: http://myPage.com/manager/index.php?a=30&id=12