2 About General Administrative Tasks

The following sections provide information about basic administrative tasks.

Starting, Stopping, and Restarting Oracle Linux Automation Manager

To start Oracle Linux Automation Manager , do the following:
  1. Open a console.

  2. Start the Oracle Linux Automation Manager service:

    sudo systemctl start ol-automation-manager
To stop Oracle Linux Automation Manager , do the following:
  1. Open a console.

  2. Stop the Oracle Linux Automation Manager service:

    sudo systemctl stop ol-automation-manager
To restart Oracle Linux Automation Manager , do the following:
  1. Open a console.

  2. Restart the Oracle Linux Automation Manager service:

    sudo systemctl restart ol-automation-manager

Accessing Log Files

Oracle Linux Automation Manager and other applications generates log files that can be useful for troubleshooting various issues.

To access and review the log files, do the following:
  1. Open a terminal on the system that is running Oracle Linux Automation Manager.

  2. Go to the following locations to review application log files: .

    • For Oracle Linux Automation Manager log files, see /var/log/tower.

    • For NGINX log files, see /var/log/nginx.

    • For Redis log files, see /var/log/redis.

    • For Postgresql, see /var/lib/pgsql/data/log and /var/lib/pgsql/initdb_postgresql.log.

      Note:

      If the database is on a remote host, log into the host running the database to find the postgresql log files.
  3. Review the logs.

    Tip:

    To find all error messages in all log files in the folder, use the following command: cat * | grep -i error.

Accessing Application Status

You can view Oracle Linux Automation Manager and other application statuses using the systemctl command that can be useful for troubleshooting various issues.

To view application status messages relating to Oracle Linux Automation Manager and other applications, do the following:
  1. Open a terminal on the system that is running Oracle Linux Automation Manager.

  2. Run the following commands:
    • For Oracle Linux Automation Manager, type sudo systemctl status ol-automation-manager.

    • For NGINX, type sudo systemctl status nginx.

    • For Postgresql, type sudo systemctl status postgresql.

      Note:

      If the database is on a remote host, log into the host running the database to find the postgresql log files.
    • For Redis, type sudo systemctl status redis.

  3. Review the application status messages and ensure that all are in the Active (running) state. Investigate any error messages.

  4. If you find error messages from the status commands, you can investigate further by running the following commands:
    • For Oracle Linux Automation Manager, type sudo journalctl -u ol-automation-manager.

    • For NGINX, type sudo journalctl -u nginx.

    • For Postgresql, type sudo journalctl -u postgresql.

      Note:

      If the database is on a remote host, log into the host running the database to find the postgresql log files.
    • For Redis, type sudo journalctl -u redis.

Backing Up and Restoring the Database

To back up the database, do the following:

  1. Log in to the database.
    sudo su - postgres
  2. Create a database dump file.
    pg_dumpall > olamv2upg.dump
  3. Exit the database session.
    exit

To restore the database, do the following:

  1. Log in to the database.
    sudo su - postgres
  2. Create a database dump file.
    psql -d postgres -f /dirwithbackup/olamv2upg.dump
  3. Exit the database session.
    exit