Server Management

If you are new to Linux, I recommend you visit the Linux Primer page first.

Manage your Server - Start, Stop, Restart and Status

Simple Backup and Restore - Database Only

Off-site Backup and Restore - Database Only

Discussion:
Additional Resources: Demo:

Backup All and Restore All - Moving both Binaries and Data

The purpose of this page is to help you manage test servers that are near-exact duplicates of production. Creating and managing test servers (UAT, Test, Dev, etc...) can be tough. Specifically, it is tough to create an exact duplicate of the production system to ensure what you are testing will behave the exact same way in production when released. Here are the steps to create your test system. Note these steps assume you are using Amazon's AWS; however, the concepts are the same for VMWare or Virtualbox.

Connecting to Your Database with phppgadmin and psql

Additional Resources:

Disaster Recovery and Prevention

Disk space issues cause 90% of iDempiere failures. Here are linux commands that help you diagnose and resolve disk issues: Disclaimer: The next section will not help directly help you solve your problem; however, it should prevent you from ever dealing with it again. I work very hard NOT to be dependent on any given machine. I generally do not allow a server to live for more than a year. Here are the tools/steps that I use to accomplish this:
  1. Keep an offsite database backup using (a) the /opt/chuboe/.../util/chuboe_backup_s3cmd.sh or (b) by maintaining a PostgreSQL read replica, or (c) both. I recommend you run this script before you reboot or perform any change that could alter the state of your server. Doing so is somewhat paranoid; however, it gives you a nearly free pass to get out of trouble.
  2. The installation script automatically adds the /opt/idempeire.. directory to a mercurial repository by executing the /opt/chuboe/.../util/chuboe_hg_bindir.sh script. You can update the chuboe_hg_bindir.sh script to also push the idempiere directory to a private remote repository. This script should be on a cron job to run every couple of hours. This script has many side benefits including detecting and undoing malicious changes.
  3. AWS offers a machine imaging service. If you create a new image anytime you modify the system's configuration (add new software, add a new script, etc...), you can always create a replacement clone of the troubled server within moments of issues like the one you are describing. The alternative to AWS imaging is to have a disaster recovery manual that tells you step by step how to rebuild a server from scratch. I prefer this option because (a) it is less expensive than keeping X versions of machine images, (b) when I upgrade a server, I always start from scratch, (c) business continuity (disaster recovery) people love this option because of the built-in documentation.
If you have the above bullets in place, your disaster recovery would look like the following:
  1. Create a new instance from your most recent AWS image. Make sure the new image gets the same internal and external IP address as your old server.
  2. Perform an hg pull and hg update in your /opt/idempiere-server/ directory to get a bit-for-bit copy of your production idempiere binary. This will include plugins as well.
  3. Restore your database from your most recent backup.
  4. Enjoy a great pay raise for saving the day (even though no one will probably know the day was in peril to begin with)

iDempiere Group Permission for Management

The below discussion offers options to make OS level user management easier for larger teams:

https://groups.google.com/g/idempiere/c/G8Y7sloeh14/m/AjlDyW_0BgAJ

More Advanced Database Backup Options

https://www.youtube.com/watch?v=FU7eqwNCD-I