[opencms-dev] opencms-dev Digest, Vol 258, Issue 2

Lammersdorf, Lorenz ll at metrohm.com
Wed Sep 16 12:33:18 CEST 2009

Hi Christoph, hi Paul,

thanks for your help. I found the template (the table is called CMS_OFFLINE_CONTENTS btw).
The restore trick doesn't work, because some idiot (me) deleted only the content, but not the file itself. Getting it back from the history didn't work also, because the file was never published.


Hi Lorenz and Christoph

You can examine the DB tables like Christoph suggests, but there's also an easier approach that just might do the trick. 

Open the OpenCms VFS Explorer:
1.) Open the context-menu on the folder where the deleted resource(s) once resided
2.) Choose "Advanced"
3.) Choose "Restore deleted"

This will enable you to restore the last version of any deleted resource under that folder.

Forgive me if I'm only stating the obvious. It's hard to know what's been attempted and what hasn't. ;-)


> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of 
> Christoph P. Kukulies
> Sent: 15. september 2009 13:47
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] locate template in database
> On Tue, Sep 15, 2009 at 10:50:43AM +0200, Lammersdorf, Lorenz wrote:
> > Hi all,
> >  
> > I have to restore an accidentially deleted template from 
> the databases backup. Does anyone know in which table the 
> template contents are stored?
> >  
> > Thanks in advance!
> > Lorenz
> I'm not deeply in opencms but I played a bit. Probably you 
> know the path of
> the template? 
> Try 
> mysql -u root -p
> mysql> use opencms;
> mysql> show tables;
> mysql> show columns from cms_history_structure;
> mysql> select resource_id from cms_history_structure where
> resource_path="/system/modules/org.your.frontend/templates/test.jsp";
> mysql> show columns from cms_offline_resources;
> mysql> select * from cms_content where
> resource_id="0d758ed0-8bd0-11de-ad6a-0015c53f6df2";
> mysql> select file_content from cms_contents where
> resource_id="0d758ed0-8bd0-11de-ad6a-0015c53f6df2";
> Maybe, don't know. Maybe I'm totally wronf, but sth. in this vein
> perhaps?
> --
> Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, 
> please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev


More information about the opencms-dev mailing list