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?
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.
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.
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!