We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7912
    • 21 Posts
    Am I missing something or is MODx in need of some sort of quick backup system or a log of previous versions?

    Last night I was working on a snippet in an external editor and when I came to paste it in I accidentally pasted it over the wrong snippet. I didn’t realise until I ran it and it failed by which time it was already saved. It then dawned on me that I had no way of getting the snippet I’d pasted over back. The same could happen with chunks, templates and most other things in MODx.

    Shot of copying the content of each snippet, template etc.. into an external editor and saving them I can’t think of a way around this. Sure MODx has a backup system but it’s not designed for situations like this.

    Another reason I need such a backup up is when I’m coding a snippet, if I make a change that doesn’t work I want to be able to go back to the previous versions without having to manually go through and undo all the changes I have made.

    Surely I am missing something! Is there no log of previous versions I can go back to if I make a change I don’t like?
      • 7231
      • 4,205 Posts
      I usually try to make at least daily database backups during development (or at least after every major change). If you keep these backups you can go back to a previous day by replacing the database with a previous one. Or like in your case you could recuperate the snippet data directly from the DB.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 32646
        • 87 Posts
        During development, I am trying to use ModBack and the standard mySQL backup under Tools every day. There is no automatic backup that I know of.
          Just learning the ropes.
          • 7912
          • 21 Posts
          Thanks for that everyone, I particularly like the idea of using my own php on the server and just including it, that way I can just use the undo features on my editor. Thanks ganeshXL.

          I’d like to see some sort of versioning for safety in future but perhaps I’m just being soft!
            • 25663 MODX Staff
            • 12,272 Posts
            Versioning with rollbacks is on the roadmap for post 097. smiley
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me