We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    This is really great! Works perfectly. grin

    Advised it to other webdesigners and they love it too. laugh

    Thank you!
      • 5274
      • 177 Posts
      Quote from: WeBe at Aug 20, 2008, 12:22 PM

      This is really great! Works perfectly. grin

      Advised it to other webdesigners and they love it too. laugh

      Thank you!

      Thank you! Version 1.9 just emerged from testing and will be posted shortly.
        • 5274
        • 177 Posts
        v1.9 just released!

        With this release the script attempts to follow a monolithic M-V-C design pattern within the bkup.php file. It instantiates the model, view and controller classes once and injects those objects throughout the rest of the script. This seems to have a side benefit of saving memory usage by avoiding what I did in the older versions with multiple object instantiations. The most significant memory savings was in the writeMySQLDump function which replaces the 3rd party mysqldumper class. The new function writes the dump file as its created instead of dong it all in memory then writing it.

        I practiced my M-V-C implementation mostly on the Verify screen functions so that has changed a lot behind the scenes. The Download File section was rewritten to eliminate the use of the 3rd party downloadfile class since I was doing most of the heavy lifting anway. I also updated the module code to eliminate the "Ready, Set, Let’s do some backups!" message by using a "header" statement instead of "a href". The only outstanding wish I have is to create my own zip function instead of using the wonderful pclZip class found in bkup_inc.php. That is an effort better left for another day, maybe after the Polar Caps melt!

        Bunches of other changes are sprinkled throughout as I replaced if/else statements with switch and ternary expressions. Simple while loops were replaced with for/endfor statements. Unless bugs pop up or new features are needed this version should be stable enough to survive for a while.

        Here’s the official list of changes:

        * Improved download process

        * Improved MySQL dump process

        * Reduced memory usage

        * Refactored code to M-V-C design pattern

        Upgrade and new installation instructions in README.txt.

        Enjoy!
          • 29076
          • 615 Posts
          This tool is so great and very helpfull. Thanks you for making it.

          But I’m still missing the opposite function. Where you can dump from the backup file and back in to modx again. Could that be possible in the future. Please. smiley
            I think, thererfor I am! But what I am, and why...?
            • 34162
            • 1 Posts
            Quote from: Sylvaticus at Aug 22, 2008, 05:02 AM

            But I’m still missing the opposite function. Where you can dump from the backup file and back in to modx again. Could that be possible in the future. Please. smiley
            That would indeed be a great addition. I vote for that one wink
              • 5274
              • 177 Posts
              Quote from: Sylvaticus at Aug 22, 2008, 05:02 AM

              This tool is so great and very helpfull. Thanks you for making it.

              But I’m still missing the opposite function. Where you can dump from the backup file and back in to modx again. Could that be possible in the future. Please.  smiley

              Clarifying questions:

              Would this include...
              1) unzipping the archive file?
              2) importing the MySQL dump file?

              I’m assuming that creating the user/password/database is done with some other tool like phpMyAdmin or a host’s control panel application.
                • 29076
                • 615 Posts
                So far I only have the principals of what I would like;

                I make a backup zip with BkupMODx and store it.
                My server crashes or my modx installation is borken. All data lost.
                I install a new, blank modx installation without demo data.
                I dump the data from the backup zip in to my new installation via i.e. BkupMODx and everything is OK again.

                I don’t know is this is possible, but at least it’s my wish. smiley
                  I think, thererfor I am! But what I am, and why...?
                  • 5274
                  • 177 Posts
                  Quote from: Sylvaticus at Aug 22, 2008, 08:33 AM

                  So far I only have the principals of what I would like;

                  I make a backup zip with BkupMODx and store it.
                  My server crashes or my modx installation is borken. All data lost.
                  I install a new, blank modx installation without demo data.
                  I dump the data from the backup zip in to my new installation via i.e. BkupMODx and everything is OK again.

                  I don’t know is this is possible, but at least it’s my wish. smiley

                  Actually you don’t need to reinstall MODx if you have a full backup. Upload the backup, unzip it, import the sql file with phpMyAdmin, done! If you don’t have access to an unzip application on the server then unzip it locally on your computer and FTP all the files to your site.

                  Thinking out loud, adding a sql dump restore capability to BkupMODx would eliminate the need for phpMyAdmin. That seems like it would provide the biggest bang for the buck.
                    • 23562
                    • 57 Posts
                    Thanks Chuck for the great BkupMODx smiley I still use 1.7 without any problems smiley will upgrade to 1.9 now, thanks again smiley this is a must for MODX , and first thing anyone should install after installing MODx grin
                      • 5274
                      • 177 Posts
                      Feature Request: Add a Restore function

                      I’ve been experimenting with a way to add a Restore function. There are 2 primary actions which are unzip files and load MySQL dump files. A simple way to approach a Restore function is to do the logical reverse of the Create function.

                      The Restore assumptions:

                      • 1) BkupMODx is installed and has a valid bkup_config
                      • 2) The zip file is structured the same as if/when it was created by BkupMODx
                      • 3) The zip file is copied to the bkup_config listed base_path
                      • 4) The MySQL database(s) exist to import the dump file(s)

                      The Restore process:

                      • 1) Look for a zip in the base path
                      • 2) Offer to unzip it from the base path
                      • 3) Do not overwrite the existing bkup_config file during the unzip process
                      • 4) Look for sql file(s) in the bkup_config listed bkup_dir
                      • 5) Offer to import the sql file(s) into a bkup_config listed dbase(s)

                      This all falls apart if the bkup_config file values used to make the backup are pointing to different relative locations than the bkup_config file used for the restore. The use of standard relative locations in the bkup_config is a benefit in this case. I’ll play around with it as time permits.