We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5274
    • 177 Posts
    Quote from: rossco at Apr 21, 2009, 04:52 PM

    Hi Chuck, i’ve just tried that latest version and mostly seems fine for me. However I have a couple questions. I have my config setup to backup the sql and to not backup the backup directory but neither is happening even though it says the whole process completed?

    Where should the sql file be exactly and I’m using dir1 = /home/site/public_html/backup/,false to not backup the backup directory.

    Thanks, Ross


    I just checked in the backup archive directory of the ZIP and I see the sql there! I had no idea it was in there and assumed it was other ZIP backups, not the SQL.

    :)

    The database dump files are located in "archive_dir = backup/archive/". You didn’t mention if you had any other directories in config but I assume you also have something like "dir0 = /home/site/public_html/,true" which will backup everything. If this is the case, your "dir1 = /home/site/public_html/backup/,false" will instruct the scripts to go back into the /backup directory a second time and backup all the files but not the subdirectories . Some of my earlier tests actually show 2 copies of the files in the zip if this was the case.

    The easiest way to fix this is to use the following config directories:

    dir0 = /home/site/public_html/,false
    dir1 = /home/site/public_html/backup/archive,false
    dir2 = /home/site/public_html/assets,true
    dir3 = /home/site/public_html/manager,true

    This config skips the the files in the "backup/" directory and includes the files in the "backup/archive/" directory. If you have other major directories you would include those as well. There are other ways but this is the least effort way to accomplish what I think you’re trying to do. Does that make sense?

    Chuck
    • Yes it makes sense with what you said. I just wanted to not backup the backup folder as I thought it would end up backing up all previous backup zips as well, making the backup zip larger each time round.

        Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
        AugmentBLU - MODX Partner

        BLUcart - MODX Revolution E-Commerce & Shopping Cart
        • 5274
        • 177 Posts
        Quote from: rossco at Apr 21, 2009, 06:46 PM

        Yes it makes sense with what you said. I just wanted to not backup the backup folder as I thought it would end up backing up all previous backup zips as well, making the backup zip larger each time round.

        Ah, I understand. Then you’ll be happy to hear that any "zip" file in the "archive_dir" is programmatically ignored to avoid that specific issue from happening. I actually thought about that ahead of time for once!
        • HAHA excellent work man, works nicely on my dedicated server.

            Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
            AugmentBLU - MODX Partner

            BLUcart - MODX Revolution E-Commerce & Shopping Cart
            • 13622
            • 74 Posts
            I was hoping someone could help me out. I’m having trouble running BkupMODx.

            I get the following error:

            Warning: fopen(/jasonimani.com/backup/archive/db281363568_20090507_005846.sql) [function.fopen]: failed to open stream: No such file or directory in /homepages/19/d203548042/htdocs/jasonimani.com/backup/model_dbdump.class.php on line 19
            ModelDbdump::dbdumpExp - ERROR: could not open MySQL dump file

            I followed the install instructions and use the defaults for everything. Thanks for your suggestions...
              • 5274
              • 177 Posts
              Quote from: jasonimani at May 07, 2009, 05:12 AM

              Warning: fopen(/jasonimani.com/backup/archive/db281363568_20090507_005846.sql) [function.fopen]: failed to open stream: No such file or directory in /homepages/19/d203548042/htdocs/jasonimani.com/backup/model_dbdump.class.php on line 19
              ModelDbdump::dbdumpExp - ERROR: could not open MySQL dump file

              Your "base_path" or "archive_dir" is not set correctly in the config.inc.php file. Assuming your using version 2.3, check the INSTALL.txt file for examples.
                • 13622
                • 74 Posts
                Yeah I was trying to debug that section last night, but no luck... Here’s what I have:

                site_url = http://www.jasonimani.com/ - Example shows: site_url = http://example.com/
                base_path = /jasonimani.com/ - Example Shows: base_path = /home/example/www/
                bkup_dir = backup/ - Example shows: bkup_dir = backup/

                I am on a 1&1 shared server. Thanks for your help, I really appreciate it.
                  • 13622
                  • 74 Posts
                  Actually, I answered part of my own question. Because I’m on a 1&1 server, the base_path is not just what I see. I need to use the full path: /homepages/19/d203548042/htdocs/jasonimani.com/. Also in the dir0 parameter.

                  Works great now....thanks for an awesome tool.
                    • 13622
                    • 74 Posts
                    As a side question, what is the best method for protecting the backup directory and files? Including the archives? Directory permissions?

                    I’m a total newbie at all this and I’m slowly learning as I go...

                    Thanks!
                      • 5274
                      • 177 Posts
                      Quote from: jasonimani at May 07, 2009, 02:57 PM

                      As a side question, what is the best method for protecting the backup directory and files? Including the archives? Directory permissions?

                      The scripts have built-in login security. If you activate the login security none of the scripts will work without a username/password combination. The ability to directly download files from the archive still exists IF the filename can be guessed correctly. It would be tough to guess since the files names have timestamps included in the name and you can change the prefix of the file names through the Config Tool or directly in the config.inc.php file.

                      The best way to secure the entire installations is to use a setup like Apache’s authentication with a .htaccess and .htpasswd files.