Search for:
How to Migrate Odoo from one Server to Another

In this tutorial, we will show you how to completely migrate your Odoo installation, from one server to another. In this tutorial, an Ubuntu 16.04 server is used as both source and destination server. The migration is also possible between different Linux distributions. If this is the case, you can use one of our Linux Host Support Services, and simply ask our expert Linux admins to do the migration for you.

Requirements:

  • SSH access on both, the source and destination server is required
  • PythonPostgreSQL and any additional dependencies like wkhtmltopdf, should already be installed on the destination server before initiating the transfer

1. Creating a backup on the source server

First, we will need a backup of your PostgreSQL database on your source server.

Log in via SSH as the odoo user on your server:

su odoo_user

Now, navigate to your Odoo directory:

cd /path/to/odoo

You can list the databases you have stored with the following command:

psql -l

You can export your odoo database by using the pg_dump command:

pg_dump dbname > db_backup.sql

Where “db_name” is the name of the database you need to export and “db_backup.sql” will be the name of the exported database.

Alternatively, if you don’t want to export your database through the command line interface, you can use some web-based GUI administration tools like phpPgAdmin or Adminer.

You can also export your database through your Odoo Database Manager directly from your browser by opening the following URL:

http://your-odoo-domain/web/database/manager

where “your-odoo-domain” is the name of your actual domain or your server IP address.

You also need to copy your odoo init and configuration file to the current directory.  For example:

cp /etc/init.d/odoo-server .
cp /etc/odoo-server.conf .

You can also open the odoo-server.conf file and check for any alternative custom addons location outside the odoo root directory. If there is, you should copy these addons as well to our current directory:

cp /path/to/odoo/addons .

Now, that we have everything we need in one place (make sure again that you are inside your Odoo directory on your server), we can create an archive of all these files with the following command:

tar -czf odoo_backup.tgz *

2. Transfer the backup

Before you transfer the backup we have made, first, you must log to your destination server and create a new user there:

adduser odoo_user

Now you can copy the backup archive from your source server to the destination with the rsync command (execute this command on the source server):

rsync -avz --progress -e "ssh -p 22" odoo_backup.tgz [email protected]:/home/odoo-user/

If SSH listens on a different port on the destination server, change the ssh port number accordingly.

You can extract the archive with the following command:

tar -zxf odoo_backup.tgz

You also need to copy your odoo-server.conf  and init file to the appropriate location;

cp odoo-server.conf /etc/
cp odoo-server /etc/init.d/

Depending on where you have placed your odoo directory, you will need to change the path to your addons directory accordingly inside the odoo-server.conf file:

nano /etc/odoo-server.conf

and edit the path for the addons_path if necessary.

Switch back to user root, and create the appropriate log file at the location specified in the configuration file. For example:

touch /var/log/odoo-server.log

3. Restoring the Database

To restore the database, create a new postgresql user with the following commands:

su postgres
createuser odoo_user

Create an empty database by executing:

createdb odoo_db

Give a password to the user:

psql
psql=- alter user odoo_user with encrypted password 'strong-password';

And grant all privileges on the database with:

grant all privileges on database odoo_db to odoo_user ;

Now, you can import your database from the source server into the newly created empty database by executing the following command:

psql odoo_db < /path/to/db_backup.sql

Again, you can use the alternative tools we have mentioned before to do this, or you can directly export it from your browser using the Odoo Database Manager.

You should also assign your odoo_user as the owner of all the files in your current odoo directory:

chown -R odoo_user: /path/to/your/odoo/directory

With this, the migration of your Odoo should be completed.

4. Start your Odoo Server

You can now start your Odoo on the new server with the following command:

service odoo-server start

You can also try to open your Odoo inside your browser and test if everything is working properly. Congratulations!

How to Install and Use PHP Composer on Ubuntu 18.04

Composer is a dependency manager for PHP (similar to npm for Node.js or pip for Python ). Composer will pull in all the required PHP packages your project depends on and manage them for you.

In this tutorial, we’ll show you how to install and use Composer on an Ubuntu 18.04 machine. The same steps can be used for Ubuntu 16.04.

Prerequisites

Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges and you have PHP installed on your Ubuntu 18.04 system.

Installing PHP Composer

If you are in a hurry and you don’t want to verify the file integrity scroll down to the Installing Composer &-8211; Quick Way section.

To install Composer on your Ubuntu system, perform the following steps:

  1. Before downloading and installing Composer, first update the packages index and install the necessary requirements:sudo apt updatesudo apt install wget php-cli php-zip unzip
  2. Now that we have php cli installed on our machine, we can download the composer installer with:php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"The command above will download the composer-setup.php file in the current working directory .
  3. Next, we need to verify the data integrity of the script by comparing the script SHA-384 hash with the latest installer hash found on the Composer Public Keys / Signatures page.We will use the following wget command to download the expected signature of the latest Composer installer from the Composer’s Github page and store it in a variable named HASH:HASH="$(wget -q -O - https://composer.github.io/installer.sig)"Now run the following command to verify that the installation script is not corrupted:php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"If the hashes match, you will see the following output:Installer verifiedIf the hashes don’t match you will see Installer corrupt. In this case you will need to redownload the Composer installation script and double check the value of the $HASH variable with echo $HASH . Once the installer is verified, you can continue with the next step.
  4. The following command will install Composer in the /usr/local/bin directory:sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composerAll settings correct for using Composer Downloading... Composer (version 1.8.5) successfully installed to: /usr/local/bin/composer Use it: php /usr/local/bin/composerThe composer is installed as a system-wide command and it will be available for all users.
  5. The last step is to verify the installation: composer The command above, will print the Composer’s version, commands and arguments.______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/ / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ / \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/ Composer version 1.8.5 2019-04-09 17:46:47 Usage: command [options] [arguments]

If you want to have a per-project Composer installation use the following command php composer-setup.php which will create a file named composer.phar in your current working directory. You can use the composer by running ./composer.phar <command>.

Installing Composer [Quick Way]

Use the following commands to quickly install Composer on your Ubuntu system:

  1. Install PHP CLI and Zip:sudo apt update && sudo apt install wget php-cli php-zip unzip curl
  2. Download Composer with curl:curl -sS https://getcomposer.org/installer |php
  3. Move the Composer file to /usr/local/bin directory:sudo mv composer.phar /usr/local/bin/composer

Getting Started with Composer

Now that Composer is installed on your Ubuntu system we will show you how to use Composer in a PHP project.

The first step is to create a directory which will be the project root directory and hold the composer.json file. This file describes your PHP project including the PHP dependencies and other metadata.

Create the project directory and switch to it with:

mkdir ~/my-first-composer-projectcd ~/my-first-composer-project

The next step is to initialize a new composer.json using the composer require <package name> command and specify the package we want to download.

In this example, we will create a sample application that will print the current time using a package called carbon .

Run the following command to initialize a new composer.json and install the carbon package:

composer require nesbot/carbon
Using version ^1.33 for nesbot/carbon
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-mbstring (v1.9.0): Downloading (100%)
  - Installing symfony/translation (v4.1.4): Downloading (100%)
  - Installing nesbot/carbon (1.33.0): Downloading (100%)
symfony/translation suggests installing symfony/config
symfony/translation suggests installing symfony/yaml
symfony/translation suggests installing psr/log-implementation (To use logging capability in translator)
Writing lock file
Generating autoload files

As you can see from the output above Composer will create the composer.json file and it will download and install carbon and all its dependencies.https://9210fa786ee935ba9f9253c0f5a047a3.safeframe.googlesyndication.com/safeframe/1-0-37/html/container.html

If you list your project’s directory , you will see that it contains two files composer.json and composer.lock, and a vendor directory.

ls -l
-rw-r--r-- 1 linuxize users   60 Aug 29 00:50 composer.json
-rw-r--r-- 1 linuxize users 6.8K Aug 29 00:50 composer.lock
drwxr-xr-x 5 linuxize users 4.0K Aug 29 00:50 vendor
  • The vendor directory is the directory where the project dependencies are stored.
  • The composer.lock contains a list of all installed packages including the version of the packages.
  • The composer.json describes the PHP project and all PHP dependencies.

You can search the Composer repository Packagist for PHP packages.

Composer provides autoload capabilities which allow us to use PHP classes without the need to require or include the files.

Create a file named testing.php and add the following code:

<?php

require __DIR__ . '/vendor/autoload.php';

use Carbon\Carbon;

printf("Now: %s", Carbon::now());

Copy

Let’s analyze the code line by line.

In the first line after the opening php tag we are including the vendor/autoload.php file that was automatically generated by Composer which will autoload all of the libraries.

Next, we are aliasing Carbon\Carbon as Carbon and in the last line we are printing the current time using the Carbon now method.

Run the script by typing:

php testing.php

The output should look something like this:

Now: 2018-08-28 23:47:19

Later on, if you want to update your PHP packages you can simply run:

composer update

The command above will check for newer versions of the installed packages and if a newer version is found and the version constraint match with the one specified in the composer.json, Composer will update the package.

Conclusion

You have learned how to install Composer on your Ubuntu 18.04 machine. We have also shown you how to use Composer to create a basic PHP project.

To find more information about Composer visit the official Composer documentation page.

N-Power beneficiaries to apply for CBN empowerment options : FG Launches Portal

THE federal government has launched a portal for exited N-Power beneficiaries to apply for Central Bank of Nigeria, CBN empowerment options

Ministry of Humanitarian Affairs, Disaster Management and Social Development, which announced the launch of the portal in a statement, explained that the platform was developed in collaboration with the CBN.

The platform, according to the statement released, Friday, by Nneka Anibeze, Special Assistant to the Minister, Sadiya Umar Farouq, “will enable exited N-Power beneficiaries to log on and apply for the various economic, empowerment and entrepreneurship options provided by the CBN.”

In the statement signed by the Permanent Secretary of the ministry, Bashir Nura Alkali, the Minister Sadiya Umar Farouq urged and encouraged interested exited beneficiaries of N- Power to log on to the portal and provide the required additional information for possible placements into the various CBN intervention options.

The Minister also emphasized that the NEXIT PORTAL will determine the suitability of the beneficiaries for the CBN affiliated programs.

READ ALSO:Humanitarian affairs ministry launches portal for N-Power beneficiary to apply for CBN empowerment

“The NEXIT portal is to determine the suitability of the beneficiaries for the CBN affiliated programs and is dependent on meeting the criteria and conditions set by the CBN for the said programs,” she said.

She expressed her deep appreciation to the CBN Governor, Mr Godwin Emefiele, for his support adding that the Ministry of Humanitarian Affairs remained committed to the vision of Mr President to lift 100 million Nigerians out of poverty in the next 10 years.

“Minister Umar Farouq pledged the Ministry’s willingness to collaborate with relevant agencies of government and other stakeholders towards the realization of that vision and congratulated the exited beneficiaries while wishing them well in their future endeavours,” the statement read.

It added: “The Federal Government of Nigeria is very proud of the milestones you have achieved during your period of service to the nation. As we prepare to exit into prospective endeavours, we are confident that you will be able to channel all you have learnt over the years into successful ventures that will improve the economy of the country and create further opportunities for you and other citizens.

“Chasing a dream requires effort, passion and hard work which you are now halfway through. I congratulate you and wish you a very successful future”.

AAUA Acceptance Fee & Payment Procedure for 2020/2021 Academic Session.

AAUA Acceptance Fee ↔ The Adekunle Ajasin University (AAUA) Acceptance Fee Payment Procedure for the 2020/2021 Academic Session has been uploaded on this Portal—All student aspiring for the Adekunle Ajasin University are to see the Payment Procedure below.


AAUA Acceptance Fee
AAUA Acceptance Fee

AAUA Acceptance Fee

Right here on this portal, we have strife to put some things in place, Meaning compiling some good and undiluted information as regards to the Adekunle Ajasin University Acceptance Fee and Payment Procedure, we don’t promise you perfect information as to the Adekunle Ajasin University Acceptance Fee and Payment Procedure. But we will try as much as we can to help you towards the Adekunle Ajasin University Acceptance Fee and Payment Procedure. All you need to to do is to follow our guidelines and see how best you can learn to further your educational career.

Adekunle Ajasin University Payment Procedure

On many Occasion, we have received calls, message, mail, and Comment from students from Nigeria Asking different Questions About Adekunle Ajasin University Acceptance Fee Payment Procedure and others Like :

Is Adekunle Ajasin University Acceptance Fee Out?, I don’t know how to Check Adekunle Ajasin University Acceptance Fee 2019?, When is Adekunle Ajasin University Acceptance Fee Application deadline?, When is Adekunle Ajasin University Acceptance Fee closing date?, How to pay Adekunle Ajasin University Acceptance Fee?, how much is Adekunle Ajasin University Acceptance Fee ?, is Adekunle Ajasin University Acceptance Fee out?, Adekunle Ajasin University Acceptance Fee requirement?, When is Adekunle Ajasin University Acceptance Fee Payment  Coming Out?, Adekunle Ajasin University courses and cut off mark.

All these questions are very important but to be sincere we will not be able to answer all but we will try taking some of them into consideration as we proceed.

Most Students of Adekunle Ajasin University often think about how to pay the Adekunle Ajasin University Acceptance Fee and its Payment Procedure, but on this portal, you will come to know and understand how to pay the Adekunle Ajasin University Acceptance Fee.

Basically Paying the Adekunle Ajasin University Acceptance Fee requires some guidelines and certainly on this portal, you will get the right information on the Adekunle Ajasin University Acceptance Fee and the Payment Procedure to your satisfaction.

While reading or studying this topic, Please we want to let you know that this article was written with a clear conscience knowing fully well that this article will help someone outside there to know more on how to pay Adekunle Ajasin University Acceptance Fee.

AAUA Acceptance Fee Payment Procedure.

  1. After confirming your AAUA admission status, generate RRR(REMITA RETRIEVE REFERENCE) in your profile
  2. PAY an Acceptance Fee of Fifty Thousand Naira (N50,000.00) only using REMITA Platform only at any of the following banks on or before 2018-12-07
    • First Bank
    • WEMA Bank
    • Keystone Bank
    • Polaris Bank
    • Zenith Bank Plc
    • Stanbic IBTC
    • Oroke Micro Finance Bank
    • Eco Bank
    • Access Bank
  3. Confirm your Payment by supplying the RRR Number on the payment receipt received from the bank
  4. Lastly, print a copy of your admission letter and await 2019/2020 resumption SMS that will be sent to you soon.

Deadline: 24th December 2019.

Adekunle Ajasin University came along with the institution which was Least Expected to grant and fight for the future of a student who values Knowledge, one of the things that set Adekunle Ajasin University Aside from other Universities is that the Institution is Based on Absolute Integrity.

This is all about the Adekunle Ajasin University Acceptance Fee Payment Procedure for the 2019/2020 Admission Exercise—should incase you have any question Pertaining to the Adekunle Ajasin University Acceptance Fee Payment Procedure Please indicate by Asking Below the Comment space.


SUGGESTED LINKS :

#EndSARS protests : NECO POSTPONES EXAM

-EndSARS protests : NECO POSTPONES EXAM &-8211; The National Examination Council has postponed Computer Studies Practical’s scheduled for Monday, October 19, 2020, until November 16

This was contained in a statement by the Head, Information and Public Relations Division, NECO, Azeez Sani, on Sunday.

Sani said the decision was taken because of the ongoing -ENDSARS protests, affecting human and vehicular movement.

He explained that the protest had affected the supply of examination materials.

The statement read, “This is to inform the general public and especially candidates that the National Examinations Council (NECO) has been constrained to reschedule the Paper I Computer Studies Practical’s earlier scheduled to take place on Monday 19 October 2020, 10 am to 1 pm. The examination of this paper will now hold on Monday 16 November 2020, 10 am-1 pm.

​”This unforeseen incident has been caused by the ENDSARS protest that blocked the free movement of transport at the City entrance gate Benin.

“The NECO delivery truck had left its take-off point well in advance two days earlier to deliver examination materials to some states and has been held up in the blockage since then.

“The Council wishes to assure all stakeholders and the general public that the affected examination materials have been retrieved intact and are in the custody of NECO’s vault.

​”While regretting any inconveniences this rescheduling may cause our esteemed stakeholders, the Council has however taken this decision in order to maintain the integrity and security of its examinations procedures for seamless conduct of the Council’s examination.”