Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

I need to configured storage config file for both database and filesystem, but when I set up the value of defaultStorageId in ItemTypes node as "defaultId" then it only published data into the broker database whether I am publishing page, and if I changed the value of defaultStorageId as filesystem then it only published data into the file system and also creates the few other folders like binarymeta , binaryvariant , componentmeta etc .

So my requirement is that if I publish a page, usercontrol etc then it should published to the filesystem and also put the detail of the page into the broker. I am attaching the database and filesystem part of my storage config file here for reference.

<Storages>        
    <Storage Type="persistence" Id="defaultdb" dialect="MSSQL"  Class="com.tridion.storage.persistence.JPADAOFactory" defaultStorage="true">
    <Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" 
             CheckoutTimeout="120"/>
          <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
                      <Property Name="serverName" Value="WIN-IJFCS71234"/>
                      <Property Name="portNumber" Value="1433"/>
                      <Property Name="databaseName" Value="Tridion_Broker_dev"/>
                      <Property Name="user" Value="xyz"/>
                      <Property Name="password" Value="abc"/>
           </DataSource>
      </Storage>
<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" 
    Id="fileStorage" defaultFilesystem="false" defaultStorage="false">
    <Root Path="c:\tridion\tork"/>
</Storage>                  
</Storages>     
<Transaction Timeout="240000" MonitorInterval="5000"/>
</Global>

  <ItemTypes defaultStorageId="fileStorage" cached="false">     
    <publication Id="16" defaultStorageId="defaultdb" cached="false">
            <Item typeMapping="Page" cached="false" storageId="fileStorage"/>
            <Item typeMapping="Binary" cached="false" storageId="fileStorage"/>
        </publication>
   </ItemTypes>
share|improve this question
    
why do you need the page to be in the broker and on the filesystem? –  Bart Koopman Apr 4 at 12:32
    
As page should be published on file system and at the same page information get updated in broker –  Nash Apr 4 at 16:43

1 Answer 1

up vote 2 down vote accepted

You need to create 2 storage configurations in your cd_storage_conf.xml, then bind the item types to the storage you want to use.

There's a good example of that here

In your example, you're binding ALL item types AND pages to the same storage, which is kind of redundant. The typical configuration scenario is "Everything in database, except for pages & binaries which go to the file system".

<ItemTypes defaultStorageId="sqlserver" cached="false">
  <Item typeMapping="Page" cached="false" storageId="filesystem" />
  <Item typeMapping="Binary" cached="false" storageId="filesystem" />
</ItemTypes>

Do you really need to have a different behavior per publication? I would normally tend to avoid one-offs in cd_storage_conf simply due to cost of maintenance...

share|improve this answer
    
As I mentioned in question that if I give the "defaultId" value in defaultStorageId attribute(rest values are same for Items) then pages get published only in database instead of filesystem but that is not happening I tried to do even with the above configuration but then its only published data in broker where as in that kind of configuration the page should published in the file system –  Nash Apr 4 at 11:42
1  
Can you try removing the defaultFileSystem and defaultStorage attributes from the storage element for your fileStorage storage? I always remove those (though I can't really remember why) :) –  Nuno Linhares Apr 4 at 12:20
    
Working now......after removing these attributes, I got this kind of storage configuration from the tridion installer –  Nash Apr 4 at 12:23
    
Thanks Nuno.... –  Nash Apr 4 at 12:24
    
Yeah, I have to do something about those confusing defaults... My apologies. –  Nuno Linhares Apr 4 at 12:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.