-
Un tar the backup.tar.gz file : tar -xzf backup.tar.gz
-
Go to the un tar backup folder, then un the filstore.tar.gz: tar -xzf filestore.tar.gz
-
rm the ~/.local/share/Odoo file: cd .local/share/ && rm -rf Odoo/
-
mv the Odoo/ which was extract from filestore.tar.gz: mv Odoo/ ~/.local/share/
-
Another think make sure you have password configuration of postgres user
sudo su - postgrespsql\password postgres-
check you have a user for your odoo database user.
-
If know create one(follow 5 to access the psql shell):
CREATE ROLE give_user_name WITH
LOGIN
NOSUPERUSER
NOCREATEROLE
INHERIT
REPLICATION
NOBYPASSRLS
CONNECTION LIMIT -1
PASSWORD 'use_a_strong_pass'
COMMENT NO ROLE your_given_user_name IS 'give a comment for the user';
Also, create database for odoo:
CREATE DATABASE your_database_name OWNER your_username;
-
Make sure you use md5 authentication on postgresql.
-
To check this open this file and check ti:
sudo cat /etc/postgresql/<version_just_tab_while_type_the_command_it_will_auto_fill>/main/pg_hba.conf | grep md5- If there is no output you need to visit the page.
sudo nano /etc/postgresql/<version_Tab_to_auto_fill>/main/pg_hba.conf- Find those line change it
peertomd5
local all all md5- Now, run this command with proper credentials. Run it on user regular user bash shell make sure you are sudo user.
sudo pg_restore -U db_user -d db_name --clean --if-exists --verbose /path- That command will prompt sudo password and then password of your postgresql database user, which you create for odoo database.