We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5274
    • 177 Posts
    This is an auto-generated support/comment thread for BkupMODx.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    This program creates a backup of a website including MySQL dumped databases. As of v2.0 it can also extract backup zip files and import MySQL dump files.

    Website Backup
    v1.4 released 2008-06-04
    v1.5 released 2008-06-09
    v1.6 released 2008-06-22
    v1.7 released 2008-07-06
    v1.8 released 2008-07-20
    v1.9 released 2008-08-22

    Website Backup and Restore: A Disaster Recovery Tool
    v2.0 released 2008-09-10
    v2.1 released 2008-10-04
    v2.2 released 2008-10-19
    v2.3 released 2009-04-19
      • 18193
      • 8 Posts
      Hi,

      I’m interested in using your script as a MODx module, but looks like I can’t get it to work lipsrsealed

      Here’s the outpout

      Backup in process...
      Start MySQL backup of arturia_test to backup/tmp/arturia_test.sql . . .
      Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 253
      Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 256
      Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 253
      Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 256
      Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 253
      Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 256
      Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 253
      Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 256
      Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 253
      Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 256
      Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 253
      Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 256
      Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 40 bytes) in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 240
      


      As you can see, I’m testing it on MAMP, with php 5 and MySQL 5.0.41, and MODx 0.9.6-RC3.
      I think the informations in the config file are accurate, at least I don’t see what else I could put grin

      As nobody seem to have tested it on MAMP, it could be the problem...
        • 29076
        • 615 Posts
        Does it restore from backup?
          I think, thererfor I am! But what I am, and why...?
          • 18193
          • 8 Posts
          Nothing is backed up. The tmp folder is created but ends up empty after executing the script.
            • 5274
            • 177 Posts
            Quote from: Many at Jun 09, 2008, 09:20 AM

            ...
            Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 40 bytes) in /Applications/MAMP/htdocs/evolution_test/backup/bkup_class_ext.php on line 240
            


            As you can see, I’m testing it on MAMP, with php 5 and MySQL 5.0.41, and MODx 0.9.6-RC3.
            I think the informations in the config file are accurate, at least I don’t see what else I could put grin

            As nobody seem to have tested it on MAMP, it could be the problem...

            Your last error line shows you are running our of memory for the script. The default is 96MB so try increasing that to 128MB in the bkup_config.php file. Either you have a large website, large database(s) or MAMP just needs the extra memory.
              • 18193
              • 8 Posts
              I had to raise it to 256MB to make it works =/

              Now the script almost entirely works...well technically it works. I got the SQL backed up, and also the archives. After a quick look I can’t tell if any data is missing, I have a really huge website...

              But I still have the " supplied argument is not a valid MySQL result resource " error. So I think some data (at least as much as fetch errors) has been lost.
                • 5274
                • 177 Posts
                Quote from: Many at Jun 09, 2008, 12:49 PM

                I had to raise it to 256MB to make it works =/

                Now the script almost entirely works...well technically it works. I got the SQL backed up, and also the archives. After a quick look I can’t tell if any data is missing, I have a really huge website...

                But I still have the " supplied argument is not a valid MySQL result resource " error. So I think some data (at least as much as fetch errors) has been lost.

                I’m glad the increased memory works for you for now. I did some googling and found a potential issue that may be the cause of both your memory and remaining MySQL errors. MODx has the ability to display PHP Info in the Manager so look for the ZLIB section. The following applies if your ISP has zlib.output_compression ON. Try turning it off in a .htaccess file like this.

                If PHP 4:
                <ifModule mod_php4.c>
                php_value zlib.output_compression off
                </ifModule>
                


                If PHP5:
                <ifModule mod_php5.c>
                php_value zlib.output_compression off
                </ifModule>
                


                If that works try reducing your memory value and see if it still works. Thanks for testing!
                  • 18193
                  • 8 Posts
                  Unfortunately, it’s already Off.

                  Thanks for the support !
                    • 27305
                    • 173 Posts
                    How long does this normally take with a website of about 600 pages? I left it about 10 mins

                    I`m just getting Backup in process...

                    But I don’t know if its doing anything?
                      I made my first site with modx
                      ------------------------
                      Shopping blog
                      Sky+ HD
                      • 5274
                      • 177 Posts
                      Quote from: simonok at Jun 09, 2008, 02:34 PM

                      How long does this normally take with a website of about 600 pages? I left it about 10 mins

                      I`m just getting Backup in process...

                      But I don’t know if its doing anything?

                      If the activity indicators (e.g. spinning globes, hour glass, progress bar) on whatever browser you’re using stop you probably have a script failure. With a large site you’ll need to increase both the ’seconds’ and the ’megabytes’ values in the bkup_config.php file. Try increasing seconds to 600 and megabytes to 256, higher if needed. If it works you can go back and skinny the values down to avoid impacting the other users if you are on a shared system.