We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9869
    • 41 Posts
    Click for full size

    Hm, there’s also nothing inside...
      --
      Design Agency - http://fruehjahr.ch
      • 9869
      • 41 Posts
      What’s that "delete"??
        --
        Design Agency - http://fruehjahr.ch
        • 5274
        • 177 Posts
        Quote from: flughund at Jan 02, 2009, 11:36 AM

        What’s that "delete"??


        Let me recap. Your sql dumps are being created successfully. The file list is being created successfully. The zip file is being created successfully. The last step is to delete the sql files on the server. That is how the script is designed to work.

        What is in the zip file AFTER you download it? Is there a /backup/archive directory IN THE ZIP FILE? Is there a sql file in /backup/archive directory IN THE ZIP FILE. If not then that can only mean you not included the /backup directory in your config.inc.php file. Please check your requested directories in the config.inc.php file or use the Config Tool to check. Make sure the /backup directory is included in one of your your directories paths with "true" for the recursive value.
          • 9869
          • 41 Posts
          Hm. I have this folder structure at root:

          [assets]
          [backup]
          index-ajax.php
          index.php
          [manager]

          Now here’s my config-file:
            --
            Design Agency - http://fruehjahr.ch
            • 5274
            • 177 Posts
            Quote from: flughund at Jan 02, 2009, 12:18 PM

            Hm. I have this folder structure at root:

            [assets]
            [backup]
            index-ajax.php
            index.php
            [manager]

            Now here’s my config-file:

            If this correct for your site?


            /home/xxx/public_html/flickr/assets
            /home/xxx/public_html/flickr/backup
            /home/xxx/public_html/flickr/index-ajax.php
            /home/xxx/public_html/flickr/index.php
            /home/xxx/public_html/flickr/manager
              • 9869
              • 41 Posts
              jep, thats correct..
                --
                Design Agency - http://fruehjahr.ch
                • 5274
                • 177 Posts
                Well the best I can recommend at this point is to remove the MySQL dump delete. Look for the following section in the control_backup.class.php file (lines 115-134):

                        // Delete MySQL dump files
                        $view -> viewNav('backup', 'delete_sql_start', null);
                        if($mdl -> mdl_config -> config['mysql'] == '3') ob_flush();
                        flush();
                
                        foreach(glob($mdl -> mdl_config -> config['base_path']
                          . $mdl -> mdl_config -> config['archive_dir'] . '*.sql') as $file) {
                
                            $mdl -> mdlNav('file', 'attr', $file);
                            $file = $mdl -> mdl_file -> file_attr;
                            $view -> viewNav('backup', 'delete_sql_file', $file);
                            $mdl -> mdlNav('file', 'delete', $file);
                
                        } // END foreach
                
                        $view -> viewNav('backup', 'delete_sql_end', null);
                        if($mdl -> mdl_config -> config['mysql'] == '3') ob_flush();
                        flush();
                
                    } // END if
                


                comment out the section by adding "/*" at the start and "*/" at the end as follows:

                        // Delete MySQL dump files
                /*
                        $view -> viewNav('backup', 'delete_sql_start', null);
                        if($mdl -> mdl_config -> config['mysql'] == '3') ob_flush();
                        flush();
                
                        foreach(glob($mdl -> mdl_config -> config['base_path']
                          . $mdl -> mdl_config -> config['archive_dir'] . '*.sql') as $file) {
                
                            $mdl -> mdlNav('file', 'attr', $file);
                            $file = $mdl -> mdl_file -> file_attr;
                            $view -> viewNav('backup', 'delete_sql_file', $file);
                            $mdl -> mdlNav('file', 'delete', $file);
                
                        } // END foreach
                
                        $view -> viewNav('backup', 'delete_sql_end', null);
                        if($mdl -> mdl_config -> config['mysql'] == '3') ob_flush();
                        flush();
                */
                    } // END if
                


                You should find the sql dump file(s) still on the server and can download the sql file(s) separately. Sorry, but I don’t understand what is preventing the scripts fro functioning as expected.
                  • 9869
                  • 41 Posts
                  Done and works! Thank you very much for this quick advise!
                    --
                    Design Agency - http://fruehjahr.ch
                    • 3749
                    • 24,544 Posts
                    Chuck, I finally got around to playing with this. What a great tool! smiley Thanks for the contribution.

                    Just one question: It worked fine for me right out of the box pm XAMPP/Vista, but in the config file, I specified these:

                    site_url = http://localhost/bobsguides/
                    base_path = c:/xampp/htdocs/bobsguides/

                    In the .zip file, I find it has backed up the xampp and htdocs folders with the bobsguides folder inside htdocs. Is this normal? I would have thought it would just back up the final directory in the path. Having them all in there makes it a little trickier to restore.
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 5274
                      • 177 Posts
                      Quote from: BobRay at Jan 28, 2009, 11:07 PM

                      Chuck, I finally got around to playing with this. What a great tool! smiley Thanks for the contribution.

                      Just one question: It worked fine for me right out of the box pm XAMPP/Vista, but in the config file, I specified these:

                      site_url = http://localhost/bobsguides/
                      base_path = c:/xampp/htdocs/bobsguides/

                      In the .zip file, I find it has backed up the xampp and htdocs folders with the bobsguides folder inside htdocs. Is this normal? I would have thought it would just back up the final directory in the path. Having them all in there makes it a little trickier to restore.

                      What value(s) do you have for dir0 - dir9? Those determine the content to backup. Try this and see if it works:

                      dir0 = c:/xampp/htdocs/bobsguides/,true

                      This is the dir0 - dir9 help message listed in the Config Tool:

                      HELP:
                      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!
                      true - to include all files and subdirectories.
                      false - to include only the files in the current directory an not include subdirectories.
                      EXAMPLE: /home/go4it2day/www/,true