Home Help Center

Freeze bakup

xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
Hello

I trying to make a Freeze bakup similar to demo/Freeze/bakup in Ice source distribution

i read the REAME an set Freeze property in the service xml descriptor before deploy the service with icepack
<icepack>
  <service name="Agenda" entry="AgendaService:create">
    <adapters>
      <adapter name="Agenda" endpoints="default">
        <object identity="AgendaServer/AgendaServer" type="::AgendaServer"/>
       </adapter>
     </adapters>

     <dbenv name="AgendaService" home="../DB/AgendaService"/>
     <properties>
       <property name="Identity" value="AgendaServer/AgendaServer"/>
       <property name="Freeze.DbEnv.AgendaService.OldLogsAutoDelete" value="0"/>
       <property name="Freeze.DbEnv.AgendaService.DbPrivate" value="0"/>
       <property name="Freeze.DbEnv.AgendaService.CheckpointPeriod" value="-1"/>
      </properties>

      <target name="debug">
         <properties>
           <property name="Ice.Trace.Location" value="1"/>
         </properties>
      </target>
   </service>
</icepack>

whe i try to run db_checkpoint i always see this error
db_checkpoint -1 -h DB/AgendaService
db_checkpoint: open: No such file or directory

the directory exists and i have read write acces to it
ls -lisa DB/
77997 4 drwxr-xr-x   3 pepone users 4096 Mar 29 21:24 AgendaService
ls -lisa DB/AgendaService
78029  0 -rw-r--r--   1 pepone users     0 Mar 29 23:19 DB_CONFIG
16392  8 -rw-------   1 pepone users  8192 Mar 29 23:21 __catalog
14927 28 -rw-------   1 pepone users 28525 Mar 29 23:21 log.0000000001


any ideas about db_checkpoint fails?


I using Ice-2.1.0 with db-4.2.52 and gcc-3.3.5

Thanks you

Comments

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    FreezeEvictor and db_checkpoint

    Hello

    My dabase use FreezeEvicor, is this incompatible with the db_chekpoint aproach to hotbackup ?

    if is not posible use db_checkpoint, there are other aproach to hotbackup with FreezeEvictor?

    and can i use db_archive with a FreezeEvictor or there are other aproach to remove old logs. ?

    Thanks
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    The hot-backup procedure works with both Freeze Maps and Freeze Evictors.

    I suspect your db_checkpoint fails because your application is not running. Berkeley DB creates __db.xxx files when an environment is opened and DbPrivate = 0.

    Cheers,
    Bernard
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    generated DB_CONFIG is empty

    Hello


    is DbPrivate setting ok in my previus config file? the DB_CONFIG file generated is empty is this the expected result and i need add DbPrivate by hand?

    thanks
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    The DbPrivate setting is an Ice property: you should see a generated Ice-config file with
    Freeze.DbEnv.AgendaService.DbPrivate=0

    This is the proper setting when you want to allow several processes to access a given environment (for example your application and db_checkpoint).

    The generated DB_CONFIG file is going to be empty unless you have some dbproperty in your descriptor, for example:
    <dbenv name="AgendaService">
          <!-- (defaults are 1000). -->
          <dbproperty name="set_lk_max_locks" value="40000"/>
          <dbproperty name="set_lk_max_objects" value="40000"/>
    </dbenv>
    

    Best regards,
    Bernard
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hello bernad

    i post the generated files for this service. there are tow diferent files config and config_Agenda

    File: ../DB/icepack/node/servers/AgendaServer/config/config
    # Server configuration
    Ice.ProgramName=AgendaServer
    IceBox.ServiceManager.Identity=AgendaServer/ServiceManager
    Ice.ThreadPool.Server.Size=5
    
    # Adapter IceBox.ServiceManager
    IceBox.ServiceManager.Endpoints=default
    IceBox.ServiceManager.AdapterId=AgendaServer.IceBox.ServiceManager
    IceBox.ServiceManager.RegisterProcess=1
    
    #
    # Service Agenda
    #
    IceBox.Service.Agenda=AgendaService:create \
    --Ice.Config=../DB/icepack/node/servers/AgendaServer/config/config_Agenda
    
    # Adapter Agenda
    Agenda.Endpoints=default
    Agenda.AdapterId=AgendaServer.Agenda.Agenda
    
    # DbEnv AgendaService
    Freeze.DbEnv.AgendaService.DbHome=../DB/AgendaService
    IceBox.LoadOrder=Agenda
    

    File: ../DB/icepack/node/servers/AgendaServer/config/config_Agenda
    Identity=AgendaServer/AgendaServer
    Freeze.DbEnv.AgendaService.OldLogsAutoDelete=0
    Freeze.DbEnv.AgendaService.DbPrivate=0
    Freeze.DbEnv.AgendaService.CheckpointPeriod=-1
    


    i think the server is runing i start it with icepackadmin before runing db_checkpoint
    ====== Checkpoint ======
    check point comand: db_checkpoint -1 -h DB/AgendaService
    db_checkpoint: open: No such file or directory
    

    and after checkpoint fails i check status with icepackadmin and it say that sever is active
    >>> server state AgendaServer
    active (pid = 7958)
    

    Database dir contents

    I don´t see never the __db.xxx or is the __catalog file ?
    bash-2.05b$ ls ../DB/AgendaService/
    AgendaServiceDB  DB_CONFIG  __catalog  log.0000000001
    

    code for create the evictor
    Ice::PropertiesPtr prop=communicator->getProperties();
    std::string dbHome=prop->getProperty("Freeze.DbEnv.AgendaService.DbHome");
    AgendaServiceI::_adapter=communicator->createObjectAdapter(name);
    AgendaServiceI::_evictor=Freeze::createEvictor(AgendaServiceI::_adapter,
              dbHome,
              "AgendaServiceDB");
    

    any ideas¿
    thaks
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Here is the problem:
    std::string dbHome=prop->getProperty("Freeze.DbEnv.AgendaService.DbHome");
    AgendaServiceI::_evictor=Freeze::createEvictor(AgendaServiceI::_adapter,
              dbHome,
              "AgendaServiceDB");
    

    You give the envName to Freeze as the second parameter to createEvictor. Here it is "../DB/AgendaService", and there is no Ice configuration for this envName, in particular DbPrivate has its default value (1).

    You should write instead:
    [LEFT]AgendaServiceI::_evictor=Freeze::createEvictor(AgendaServiceI::_adapter,
              "AgendaService",
              "AgendaServiceDB");[/LEFT]
    

    Cheers,
    Bernard
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Thanks problem solved

    Thanks a lot Bernard all runs Ok now i misunderstand dbenv configuration property
Sign In or Register to comment.