We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28651
    • 26 Posts
    So how exactly would someone go about restoring from a backup made on this program?
    For example say I wanted to restore this to a new database and new server.
      • 5274
      • 177 Posts
      Quote from: stormlifter at Sep 15, 2009, 10:55 PM

      So how exactly would someone go about restoring from a backup made on this program?
      For example say I wanted to restore this to a new database and new server.

      The program can make a full backup of all files in a MODx installation and include MySQL database dumps into a single zip file. Upload the zip file to the new server, extract it, create your new database with a 3rd party tool. Manually modify the BkupMODx config.inc.php for the new server and new database then use BkupMODx to restore the sql files to the new database and you should be done.
        • 18722
        • 4 Posts
        Hi Chuck,

        Actually, I had made two mistakes:
        1) I blindly copied the install.txt to config so as to get the trailing comments // but they don’t seem to be accepted in the config file.
        2) As to base_path, I’d put the DOCUMENT_ROOT of my server (/windows/www/) but as I am at a subdirectory below, it’s that directory that is the good one (windows here is just the name of a mounted partition on Linux):
        site_url = http://localhost/pietModx/
        base_path = /windows/www/pietModx/
        bkup_dir = backup/
        archive_dir = backup/archive/
        archive_name = fullbackup
        seconds = 180
        megabytes = 64

        Well, things seem to work fine. Thanks for this tool, your help and the professional writing of the code.
          • 3071
          • 99 Posts

          I am using BkupMODX to try to create a zipped backup of my site but for some reason keep getting this message:


          Start MySQL dump create . . . mydatabase_name_20091123_063704.sql Size: 2787462 (3MB) . . . Finish MySQL dump create.

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

          Start zip archive . . . mywesbite_bkup_20091123_063704.zipModel File::fileAttr - ERROR: missing required file: /home/content/h/e/y/myrootpath/html/stats/logs

          I checked that my absolute root is correct and that all is correct in the config.inc.php file..Does anyone have any idea what might be causing this? Thanks.
            • 5274
            • 177 Posts
            Quote from: benchesters at Nov 23, 2009, 02:13 PM
            ERROR: missing required file: /home/content/h/e/y/myrootpath/html/stats/logs

            What’s special about the identified file? For example, is it a link to a file outside the normal webspace?
              • 15612
              • 2 Posts
              I’ve been creating my first MODx site on a local Xampp installation, and I used BkupModx to move it onto the server.
              The tool made it easy, but I had one or two minor hiccups that might help someone else in the future:
              1) After I had uploaded and restored the backup, the new website showed only the home page on the menus, until I thought to clear the cache!
              2) The paths in Tools/Configuration/File Manager/File Manager Path and Tools/Configuration/Interface & Features/File base path need to be updated manually to the right place (or you can’t find any images when you try to insert them into documents!)
              3) If you put a space between the ’,’ and ’true’ in the dir0 path, it doesn’trecurse into the subdirectories (not very easy to see on the screen - took me a while to work out why my backup was only 6kb)
              4) (maybe a bug?) Although the backup ignores the zip files it creates in backup/archive, it doesn’t ignore files with a different prefix, so the uploaded file gets included in the backup. (i.e. on the new site I use "newsp_bkup", but the uploaded backup was prefixed "standpretty_bkup". I can delete it now that I’ve imported it, but shouldn’t all the files on backup/archive be skipped?
              Regards,
              Ken
              • chuck, why not adding this code in the 1st line of config.inc.php?
                <?php die();?>
                

                it’s only to protect the file.
                each time i created that line, and edit something back inside BkupMODx, it override back to the default file.
                  Rico
                  Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                  MODx is great, but knowing how to use it well makes it perfect!

                  www.virtudraft.com

                  Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                  Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                  Maintainter/contributor of Babel

                  Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                  • 5274
                  • 177 Posts
                  Quote from: KenAdam at Nov 30, 2009, 08:15 AM

                  but shouldn’t all the files on backup/archive be skipped?

                  The backup/archive is the directory used for storing the .sql dumps prior to the zip process. After the zip process the .sql dumps are deleted. Skipping the .sql dump files in the backup/archive would be less than a full website backup. The backup/archive is also used to retain previous or uploaded backups with a .zip extension. Files that have a .zip extension are the only files ignored in backup/archive during the zip process. If you are uploading files without a .zip extension then they will be included in any new backups.
                    • 5274
                    • 177 Posts
                    Quote from: goldsky at Dec 02, 2009, 05:29 AM

                    chuck, why not adding this code in the 1st line of config.inc.php?
                    <?php die();?>
                    

                    it’s only to protect the file.
                    each time i created that line, and edit something back inside BkupMODx, it override back to the default file.

                    Great catch goldsky! I don’t know how I’ve missed that for so long. I’ve included your suggestion (without the closing "?>") in the attached file. The forum doesn’t allow the upload of php files so the file must be renamed from model_config.class.txt to model_config.class.php.

                    The changes start on line 321 of file
                    // Create file content
                        $temp  = '<?php die();' . $lf;
                        $temp .= $lf;
                        $temp .= '// Protect this file! It contains sensitive information about your website.' . $lf;
                        $temp .= $lf;
                    


                    SECURITY ALERT:
                    I recommend everybody using BkupMODx 2.3 install this replacement backup/model_config.class.php file as a security precaution. The md5sum for model_config.class.txt is 81fe027fd85ee59cd0d2278b8a86695b for those who like to check.
                      • 15612
                      • 2 Posts
                      Chuck:
                      Files that have a .zip extension are the only files ignored in backup/archive during the zip process. If you are uploading files without a .zip extension then they will be included in any new backups.
                      Fair enough, but my problem is that the file has a .zip extension, but is still included in the backup.
                      The archive tool correctly lists is as "standpretty_bkup_20091126_074230.zip" and it appears in the backup (path backup/archive) along with the placeholder and the sql file, but the backups created online (e.g. newsp_bkup_20091130_074755.zip) are excluded as I expected.
                      Is this what you expect to happen?
                      I should mention that I had to upload this file using FTP as the "upload" facility crashed out at the end of the upload process. (not sure what the error was)
                      Regards,
                      Ken