We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32540
    • 19 Posts
    Hi all,

    I’m successfully using BkupMODx on multiple sites and multiple servers. One particular site, however, isn’t completing the backup process. The /backup folder has the same permissions (755) as another site on the same server which is able to successfully complete the backup process. Here is the output of BkupMODx:


    Backup in process . . .

    Start MySQL dump create . . . dwaircms_20091216_192752.sql Size: 1164729 (1MB) . . . dwaircms_20091216_192752.sql Size: 1164729 (1MB) . . . Finish MySQL dump create.

    Start file list . . . File count: 7770 . . . Finish file list.

    Start zip archive . . . dwaircms_backup_20091216_192752.zip

    Here is the config:
    login      = true
    timeout    = 0
    activity   = false
    user_pass0 = admin,[removed for security]
    site_url     = http://subdomain.host.com/site/
    base_path    = /file/path/to/modx/base/path/site/
    bkup_dir     = /assets/modules/backup/
    archive_dir  = backups/
    archive_name = dwaircms_backup
    seconds      = 2400
    megabytes    = 128
    dir0 = /file/path/to/modx/base/path/site/,true
    mysql  = 3
    host   = host.com
    user   = [removed for security]
    pass   = [removed for security]
    dbase1 = dwaircms
    


    Server specs:
    Platform Type
    Debian
    MySQL Version
    5.0.83
    PHP Version
    5.2.5

    Any thoughts?

    Edit: here is the output of a site running on the same server using almost exactly the same config, but works:


    Backup in process . . .

    Start MySQL dump create . . . scigirlsdev_20091216_183748.sql Size: 549500 (537KB) . . . scigirlsdev_20091216_183748.sql Size: 549500 (537KB) . . . Finish MySQL dump create.

    Start file list . . . File count: 2186 . . . Finish file list.

    Start zip archive . . . scigirlscmsbackup_20091216_183748.zip Size: 20653732 (20MB) . . . Finish zip archive.

    Start MySQL dump delete . . . scigirlsdev_20091216_183748.sql Size: 1099000 (1MB) . . . Finish MySQL dump delete.

    PHP Version >= 5.2.0 - Peak memory usage: 18087936 (17MB)
    Backup process complete . . .
      • 5274
      • 177 Posts
      The file count on the problem site is much higher than the working site. Try increasing the megabytes value to 256 or even 512. If those fail use -1 for maximum allowed memory.
        • 32540
        • 19 Posts
        Quote from: Chuck at Dec 17, 2009, 02:36 AM

        The file count on the problem site is much higher than the working site. Try increasing the megabytes value to 256 or even 512. If those fail use -1 for maximum allowed memory.

        Thanks, Chuck. I appreciate the prompt response. Unfortunately, using -1 for the memory didn’t fix the problem. The file count increased by 7, though. Heh, I wonder what it’s choking on.


        Backup in process . . .

        Start MySQL dump create . . . dwaircms_20091216_224946.sql Size: 1219981 (1MB) . . . dwaircms_20091216_224946.sql Size: 1219981 (1MB) . . . Finish MySQL dump create.

        Start file list . . . File count: 7777 . . . Finish file list.

        Start zip archive . . . dwaircms_backup_20091216_224946.zip

        It does create a .zip file, but it never gets to the SQL dump deletion. The difference in file size between a max memory limit of 128MB and -1 is ~1.5 megs. It went from 8.83MB to 10.19MB. Odd.
        • I was using it for a site heavy on flash movies, and it was working fine until I added speedtest. That contains nearly 100Mb of enormous image files for testing with, and put the memory limits over the domain configuration memory limits. I suspect that even with another 100Mb of smaller files it would have been OK; it was the 30Mb images that choked it. Too bad it doesn’t have an exclude feature; I could just tell it to exclude assets/media/speedtest, and all would be well. As it is, I’m going to have to move speedtest to the site root, and then include assets, backup and manager.
            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
            • 5274
            • 177 Posts
            It has an implied exclude feature if you creatively use the true/false value with the directories.

            From an old example file

            // These are the directories to include in your backup.
            // You should include the trailing slash '/' on the directories to backup.
            //   Always use '/' (not '\') for Linux and Windows, it's a PHP thing!
            // The boolean value (true/false) after the directory must not have a space before or after.
            //   true - to include all files and subdirectories.
            //   false - to include only the files in the current directory an not include subdirectories.
            // Up to 10 directories can be specified.
            //   You only need one directory if its the top directory with 'true'!
            //   Make sure 'backup/tmp' is included in your directories if you want the MySQL dump files included.
            
            
            • Right. But if you want to exclude certain subdirectories of the assets/flash or assets/media or any other subdirectories, that means you have to include assets set to "false", then explicitly include all of the assets directories, with the flash subdirectory set to "false", then explicity include the subdirectories of assets/flash that you want included. You’ll run out of 10 includes real fast that way.
                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
                • 5904
                • 58 Posts
                Hi,

                Attempting to use v2.3 to backup a site that’s been live & all well since November 09. Was using AutoBackupIncremental 2 until just recently when it stopped backing up (now just creates a small tmpbackup.zip file.

                So, I’ve renamed the AutoBackupIncremental 2 ’backup’ folder to ’_backup’ and installed BkupMODx by following the INSTALL.txt guide. Chose to create a module in MODx Manager and when I invoke it a 404 error is returned. Also same result if I run the index.php file in the new backup folder.

                I’ve carefully checked the settings in the config.inc.php file and looked through all of this thread but I’m still in need of some tips.

                A couple of queries about the settings in the config.inc.php file:

                - Are the username and password those for the MODx database? Note: the database password has a ’!’ in it.
                - Should the file remain in the backup folder or should the contents be appended to the manager/includes/config.inc.php file?

                Any suggestions gratefully received smiley
                • 1. No, this is a separate username/password for using the backup utility (with or without the module).

                  2. By default, it is expected that the entire ’backup’ folder is uploaded to your site root. The code in the module simply points to the files in this folder and runs the script in the Manager’s frame. If you’ve uploaded the ’backup’ folder elsewhere, you’ll need to edit the module code to point to wherever it actually is.
                    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
                    • 5904
                    • 58 Posts
                    Wow! Thanks for your quick reply Susan... and for clarifying the user0, etc use.

                    I unzipped BkupMODx locally and did an FTP upload to the Linux server to the default www/backup folder.

                    So, to recap, I’m just seeing a 404 error when the module is run or www.mysite.com/backup/index.php is entered in a browser.

                    Any ideas?

                    Craig

                    PS I began exploring MODx last year and your site helped so much - thank you!
                    • Without seeing your actual file structure, I can’t make any suggestions, other than to double-check your paths and locations as well as file/directory permissions.
                        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