We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36582
    • 463 Posts
    Many thanks for a great framework.

    I’ve got a couple of live sites up and running and I know you’ve probably been asked this before but is there a definitive way to back up a site and should I be doing any database truncating on a monthly basis say?

    I’m coming at this from the point of view of a designer with limited PHP and database knowledge - for instance I don’t actually know what truncating a database table will do!

    I’m getting some great results with MODx but this part of things is beginning to worry me.

    Thanks in advance.
      Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
      • 25663 MODX Staff
      • 12,272 Posts
      Hi chrisandy,

      Base on what you’re saying, it sounds like you’re running 095 or earlier, which includes built in stats. You’re right to be worried because they can add a lot of overhead to your site and can melt-down even moderately loaded sites. They were removed completely from 096 because there are clearly superior solutions available including weblog analyzers like AWStats, and Google Analytics (both free) or low-cost high-cool-quotient options like Mint.

      When the next patch release to 096 comes out I’d recommend upgrading to it (should be this week), and adding Google Analytics to your site for keeping track. Then you won’t need to worry about truncing tables, except possibly the manager log, which I only use when clients claim they’ve not touched a page but somethings wrong (guess what the manager log invariably says?)...

      Good luck!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 36582
        • 463 Posts
        Thanks for that - yes these sites are 095 - but if I upgrade to 096 surely I will need to back up somewhere along the line?
          Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
          • 7923
          • 4,213 Posts
          Quote from: chrisandy at Jul 23, 2007, 09:17 AM

          but if I upgrade to 096 surely I will need to back up somewhere along the line?
          Will computers break or do people make errors? smiley

          Yes.. i’d backup. There are some modules to help with that in the resource repository if you don’t want to do it manually (eg. take dump from the sql db and copy filesystem content). One is called modbak if i remember correctly.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 25663 MODX Staff
            • 12,272 Posts
            Oh man if you’re not backing up ... start immediately. Web servers crash. Hosts make config changes to the server without warning. Shared servers get compromised (see recent Dreamhost issue). People sometimes get in a hurry and hit the save button when copying things from one site to another but do it in the wrong site (I did this two weeks ago).

            Backups are beyond critical!
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 36582
              • 463 Posts
              So would you say that the essential and only thing I need to do is to carry out an sql dump and save the content locally?

              Or is there anything else I need to do?

              Many thanks
                Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
                • 25663 MODX Staff
                • 12,272 Posts
                I personally would back up your assets directory, your config.inc.php file and a dump of your db regularly at a minimum.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 10573
                  • 101 Posts
                  Which way to back up the sql?

                  Using CPANEL sql backup?
                  Phpmyadmin sql export?
                  or the Modx sql backup?

                  Personally, I’ve been using phpmyadmin for backup.
                    • 36582
                    • 463 Posts
                    Yes - I was looking for a way that is ’version independent’ and so I think using a combination of phpmyadmin to dump the database and then straightforward FTP to back up the assets and other files mentioned by rthrash is the way to go.

                    Many thanks
                      Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk