We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31902
    • 342 Posts
    Wondering if anyone's heard of a way to get MODx Revo (2.1.3) to, first create automatic db backups and then send them to an email account as an attachment or something.

    I looked into using the Databackup/CronManager snippet combo but for the life of me I just can't get the thing to work.

    Not that I'm any kind of db/cronjob expert, but following the instructions provided just results in no backups in the assigned directory (I was going to worry about getting it to email out later on, after I got the basic combo to work, first).

    Anyone out there get this snippet combination to work in automating db backups? What I did was this:

    1. Downloaded and installed both Data Backup and Cron Manager.
    2. Created a directory in my root (yes, I tried putting it behind the web root first but I figured this way was quicker to test first) and called it 'dumps'.
    3. In Components > Cron Manager, I created a new cronjob, assigned it to the backup snippet, time of 1 minute and set active to 'yes'.
    3. In the server's control panel, I went to the cronjob section (I'm wondering if I understood the Cron Manager user guide correctly here...correct me if I'm wrong) and created a new cronjob with the following settings: 1 minute, command of /home/'username'/assets/components/cronmanager/ && php cron.php.

    Anyway, this all resulted in...nothing. No change in the Cron Manager logs and nothing sitting in the dumps directory.

    What obvious thing am I missing?

    I was following the instructions on these pages:
    Data Backup: http://rtfm.modx.com/display/ADDON/Databackup
    Cron Manager: http://rtfm.modx.com/display/ADDON/CronManager

    Revo: 2.1.3.
    PHP: 5.2.10

    Thank you in advance. [ed. note: waizen last edited this post 14 years, 10 months ago.]
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I'm not so sure that sending the entire backup archive by email is a particularly good idea, but it certainly wouldn't be at all difficult to send a notification with a link to the backup archive file.

      The old Evo backup utility modback will work with Revo with a little tweaking, and doesn't even need tweaking if you run it as a stand-alone module. It even has its own zip library so it doesn't depend on the hosting having it included in the PHP configuration.

      https://forums.modx.com/thread/25142/backup-solution-for-revo#dis-post-128997
        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
        • 31902
        • 342 Posts
        Thank you, Susan! I'll look into it.
          • 3109 ☆ A M B ☆
          • 894 Posts
          Check out the Janitor extra for Revo I think it does this already, I've used it a few times but not for auto backups, I think it supports it though.
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 31902
            • 342 Posts
            Just out of curiosity, Susan, and my own education, why do you state that sending the entire backup archive by mail is not as good an idea as sending a notification with a link?

            My idea was to have the archive automatically available on my local hard drive and off the server. What painfully obvious thing is my bone-head brain missing?

            BTW: this would be for the db only...not the entire site files, so the attachment would be relatively small.
              • 31902
              • 342 Posts
              Thanks, benmarte... I'll look into that, too.
                • 31902
                • 342 Posts
                benmarte: I just tried your solution and it seems to do exactly what I'm hoping! Thank you. Of course, more testing will be done before I can depend on it, but I think this is spot-on.