We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28471
    • 48 Posts
    Hi All,

    Here is a module to backup your entire MODx based site (files & database) into one .zip file, for a single download.

    Useful for backing up and moving from a staging server to production server.

    Run it, click generate button, than download .zip file

    * Multiple backups can be kept, just hit generate again.
    * Log data is not inserted into sql dump file to reduce sql bloat

    I’ve tested it in a few different hosting environments (Linux, Windows XP) and it seems to work ok, however any feedback would be appreciated.


    Installation is fairly straightforward.

    1. Create a directory on your webserver to hold modx .zip archives (ie /home/username/_backup ) and set read/write permissions to 777
    2. Unzip modbak directory under /assets/modules/ directory. --> /assets/modules/modbak
    3. Edit /assets/modules/modbak/download.php, and set $modx_backup_dir to backup dir in new directory created in (1)
    4. Create a new Module in MODx manager and copy contents of modbak.module.tpl into module code.
    5. Now run module, click generate, if it works there should be a .zip link containing your modx site.


    7 Mar 07 v0.9.4 - Fixed . in sitename, added settings.php file to simplify config
    4 Mar 07 v0.9 - Added table_prefix, restructured code
    - archive and database filenames by default use sitename (ie mysite12-10-07.zip, mysite.sql)
    - memory and time limits are set as variables (however also dependent on php.ini host setup)

    13 Feb 06 - Added theme look, tested some more, all database tables included, however log data is not inserted.
    11 Feb 2006 - Updated MODx module(modbak05.zip) to backup entire modx site including the database tables (by default LOG tables are not included in backup).

    Hope it comes in Handy.

    Rob Stemp
      • 25663 MODX Staff
      • 12,272 Posts
      PLEASE post that up. laugh
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 15914
        • 145 Posts
        That sounds fantastic. Oooh, yes please!
          Kunal Kapoor
          Technical Director
          Limesharp Internet Limited - Effective, Functional, Standards Compliant

          IRC Nick: KingKoopa
          Skype ID: KingKoopa16
          • 10487 MODX Staff
          • 1,535 Posts
          Hi stempy,

          Great module! laugh Just tested this on my live website and worked a treat.

          Cheers, Garry
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Quote from: stempy at Feb 10, 2006, 10:05 PM

            Might include an sql dump of the modx database aswell.

            Just keep in mind that the logging tables can be a real killer if their data is dumped as well!
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 28471
              • 48 Posts
              Quote from: sottwell at Feb 11, 2006, 05:21 AM

              Just keep in mind that the logging tables can be a real killer if their data is dumped as well!

              Ok, thank you for that, I have updated the module to include just the table structure for the logs.
                • 32963
                • 1,732 Posts
                Very nice module! smiley

                I’ll have a look at it later to see if I can convert it into an installable package
                  xWisdom
                  www.xwisdomhtml.com
                  The fear of the Lord is the beginning of wisdom:
                  MODx Co-Founder - Create and do more with less.
                  • 8869
                  • 32 Posts
                  Hi

                  The Modbak module functions great but the interface doesn’t render properly under IE6 (its fine in firefox) - see attached IE screen grab.

                  I have also added txt file of the source.
                    • 28471
                    • 48 Posts
                    Quote from: en8scl at Feb 22, 2006, 10:22 PM

                    The Modbak module functions great but the interface doesn’t render properly under IE6 (its fine in firefox) - see attached IE screen grab.

                    Thanks en8scl for bringing this to my attention, however it works fine on my IE6, Is anyone else having this problem?
                    Perhaps you could upload the html source of that page.
                      • 8471
                      • 333 Posts
                      Hi, I have a stupid question: how I restore the modx backup and the sql database ?
                      Thanks to all
                        Sorry for my bad English grin