[opencms-dev] locate template in database

Paul-Inge Flakstad flakstad at npolar.no
Tue Sep 15 16:30:02 CEST 2009


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. ;-)

Cheers,
Paul

> -----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