We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1531
    • 42 Posts
    My development server crashed and i lost my sql files. Is there any way to access my site templates or was it stored in the database?

    Dont start abouts backups....
      The man, the myth
      • 7923
      • 4,213 Posts
      No, do backups.

      Edit.. there is a snippet floating around on these forums called IncludeFile, you can use that to store your templates into file system files if you want.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 33372
        • 1,611 Posts
        Doh! Well, yes your templates are stored in the database just like your snippets, documents, etc., so that means that - except for any CSS and other external files you’ve been using - your templates have also been lost. Have you tried using any data recovery tools on the drive to see if you can recover anything from it?

        Things like this have happened to me in the past, and usually I’ve been able to recover the data one way or another. I have Google Desktop Search installed on my PC, for example, and it saves cached versions of web pages I’ve viewed. Your browsers may also have cached versions of these files, so look there carefully. And if the site were public, I’ve even been able to restore lost data by looking for cached files on Google or the Way Back Machine.

        Of course those files would be the final output of your pages (not the templates themselves), but you should be able to recreate your templates from them easily enough.
          "Things are not what they appear to be; nor are they otherwise." - Buddha

          "Well, gee, Buddha - that wasn't very helpful..." - ZAP

          Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
          • 1531
          • 42 Posts
          I have the site on a mac and data recovery tool are more rare. Gonna try one (diskwarrior) today.
          Well gonna set up som automatic backup-system. At least there was only my sites but i was going to lauunch one of them this weekend... bah embarrassed
            The man, the myth