View source | Discuss this page | Page history | Printable version   

Openbravo Cloud System Administration Guide

Contents

SSH access

For security Openbravo Cloud instances are configured to not allow SSH access by password but instead only accepts public key authentication.

When requesting your Openbravo Cloud instance you will have chosen a hostname and will have already provided your SSH public key. It will be already added to the instance for the openbravo user.

From a linux system you can use:

ssh openbravo@<hostname>

Replace <hostname> with the ones you have chosen on signup.

From windows systems Putty is a well known ssh client.

How to add more public keys

After connecting by ssh you can add more public keys if needed to the .ssh/authorized_keys file by using any editor like nano or vim.

Paths, where to find what

* Openbravo:   /opt/OpenbravoERP
* Attachments: /opt/OpenbravoERP/attachments
* Logs:        /var/log/openbravo
* Tomcat:      /var/lib/tomcat
* Webapp:      /var/lib/tomcat/webapps/openbravo

How to start, stop postgres and tomcat

First connect by ssh with your user.

For restart tomcat:

sudo /etc/init.d/tomcat stop
sudo /etc/init.d/tomcat start

For restart postgres:

Bulbgraph.png   It should not be necessary at all in normal operation to restart postgres. And in case you need it stop tomcat first.
sudo /etc/init.d/tomcat stop
sudo /etc/init.d/postgresql restart

How to execute ant commands

Go to Openbravo path, by default after login you will be in openbravo folder: /opt/OpenbravoERP.

And there you can execute as usual your ant task

ant ...

All the needed environment variables (CATALINA, ANT, ...) are already preconfigured, there is no need to modify or set any of those.

Connecting to PostgreSQL

Connecting to the database locally

To connect locally to the database you can use the following:

export PGPASSWORD=tad
psql -h localhost -p 5432 -U tad openbravo

Connecting to the database remotely

In order to access the database, you need to create a ssh tunnel.

Then from linux you can open the tunnel with:

ssh -L 5433:localhost:5432 openbravo@<hostname>

Replace <hostname> with the one chosen on signup.

In windows you can use putty, adding this config to the usual ssh config:

  1. In the principal window of putty "Session"
    1. Host Name = <hostname>
  2. Go to Connection -> Data
    1. Auto-login username = openbravo
  3. Go to Connection -> SSH -> Tunnels
    1. Source port = 5433
    2. Destination field = localhost:5432
    3. Click "Add"
  4. Click on "Open"
  5. The first time you connect you need to accept the fingerprint

Now in your computer in port 5433 it will be available the postgres of your On Demand instance.

You can configure a new connection in your sql program (pgAdmin for example) with:

Downloading a file

To download a file you can use scp or rsync in linux and winscp or filezilla in windows.

For example to download the catalina.out and openbravo log: In linux:

scp openbravo@<hostname>:/var/lib/tomcat/logs/catalina.out .
scp openbravo@<hostname>:/var/lib/tomcat/logs/openbravo.log .

Replace <hostname> with the ones chosen on signup.

In windows connect with winscp using your ssh information.

Change timezone

On signup you will have provided the timezone for the server you want to use and it will be preconfigured by Openbravo.

If you need you change the timezone later please contact Openbravo Support.

You can check the current timezone with:

date +%Z

Do not change the timezone of Tomcat or Postgres individually, instead request a timezone change of the server, especially you should never have a different timezone in Postgres and Tomcat

Create your own personal backups

Bulbgraph.png   Remember that there is automated backups done by the Cloud platform so in general you can forget about taking backups, only use it when you want a backup for a specific reason, for example before an update of Openbravo version.

To create a backup:

openbravo-backup

It will be stored /backups/manual folder.

You can list the manual backups with:

 ls -l /backups/manual

Later, you can restore any of the backups.

Restore the backup

Check that the application is not in use, and nobody is accessing the database by psql or pgadmin.

The restore will DELETE all the current Openbravo data, this include:

Check that you will not need any of this data, if no run a backup before the restore..

Bulbgraph.png   Since the restore takes sometime and with big databases of some gigabytes the time can be some hours, it is highly recommended to run the restore inside a screen.

Once you are ready you can run the restore as openbravo user with:

openbravo-restore <backup> | tee restore.log

For example: openbravo-restore /backups/auto/backup-20130315-1243-UTC.tar | tee restore.log

Tee will output the log to the console and also will store in the file restore.log.

The restore will decompress the tar-file into temporary folder inside /tmp/ and check the integrity of the files contained (sha1sums).

Then it will stop tomcat and delete the database, if the database is still accessed by someone like an open psql connection, the restore will stop here.

The next it does is the restore of the database.

If there are any warnings or errors those should be reviewed, as they may indicate missing data or some other problem preventing a correct and complete restore into the database.

The next step will be delete sources and webapp and restore it with the data from the backup.

The restore script will not start tomcat automatically, so you will need to start it manually:

sudo /etc/init.d/tomcat start

Retrieved from "http://wiki.openbravo.com/wiki/Openbravo_Cloud_System_Administration_Guide"

This page has been accessed 2,315 times. This page was last modified on 12 May 2016, at 12:54. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.