katratxo on Software Development

tail -f /var/log/brain | grep -i software

Update: Making a snapshot of your Openbravo instance

with 4 comments

I just updated the snapshot.xml script adding a new property exclude where you can define as comma separated values the patterns you want to exclude from the zip file.

If you are not familiar with this script, I suggest you read my previous post on how to make a snapshot of your Openbravo instance

I tested in some recent revision from pi, and excluding Mercurial metadata and the resulting zip file is almost 350MB smaller!

~/workspace/src/openbravo $ ls -lh openbravo-2011*
-rw-r--r-- 1 iperdomo iperdomo 254M Jan  5 11:04 openbravo-2011-01-05_11-02-07.zip
-rw-r--r-- 1 iperdomo iperdomo 603M Jan  5 11:19 openbravo-2011-01-05_11-10-58.zip

How it works?

You just need to append the property with the list of excluding patterns in the ant call, e.g. Let’s exclude all the .hg folder

~/workspace/src/openbravo/pi $ ant -f snapshot.xml -Dexclude=".hg/**"

The exclude property is passed directly to the Zip task. In order to understand how can you define exclusion patters read the Zip task documentation

Happy new year!


Written by katratxo

January 6, 2011 at 10:19 am

4 Responses

Subscribe to comments with RSS.

  1. Hi Iván,

    I am looking for Openbravo Backup Strategy from past one month, will this Snapshot work for Oracle data base on window environment if so can you please post the snapshot.xml which works for oracle database.



    January 7, 2011 at 8:40 am

    • Hi Ram,
      As you can read in the first post, this script doesn’t work with Oracle, that’s why this task is not part of the main build.xml of Openbravo’s distribution.

      If you have experience with ant build files and with imp/exp binaries from Oracle, you could try make it work.

      I’m open to receive patches and incorporate new features into the script. Please notice that you need to follow the standard process of contributing to Openbravo. More information on the Contributor’s Guide

      Best Regards,



      January 7, 2011 at 10:13 am

  2. I’m using it on a an instance as we speak. Very helpful. Just wondering, you seem to take it from the developers perspective. When in a “normal” environment, what folder do I delete in /opt/OpenbravoERP that I replace the contents with?


    January 8, 2011 at 8:41 pm

    • Hi,
      If your sources are located in /opt/OpenbravoERP that folder is the one you need to replace with the zip contents.
      If you installed Openbravo using the Ubuntu package, /opt/OpenbravoERP-2.50 contains the sources plus Tomcat and PostgreSQL files. In this case the folder you need to replace is the /opt/OpenbravoERP-2.50/openbravo-erp

      Best Regads,


      January 8, 2011 at 11:01 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: