Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Latest commit

 

History

History
75 lines (51 loc) · 1.73 KB

restore.md

File metadata and controls

75 lines (51 loc) · 1.73 KB

Get Started

  1. Un tar the backup.tar.gz file : tar -xzf backup.tar.gz

  2. Go to the un tar backup folder, then un the filstore.tar.gz: tar -xzf filestore.tar.gz

  3. rm the ~/.local/share/Odoo file: cd .local/share/ && rm -rf Odoo/

  4. mv the Odoo/ which was extract from filestore.tar.gz: mv Odoo/ ~/.local/share/

  5. Another think make sure you have password configuration of postgres user

sudo su - postgres
psql
\password postgres
  1. check you have a user for your odoo database user.

  2. 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;
  1. Make sure you use md5 authentication on postgresql.

  2. 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
  1. If there is no output you need to visit the page.
sudo nano /etc/postgresql/<version_Tab_to_auto_fill>/main/pg_hba.conf
  1. Find those line change it peer to md5
local   all             all                                     md5
  1. 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
  1. That command will prompt sudo password and then password of your postgresql database user, which you create for odoo database.