- Goto you custom module folder
cd /path/to/your/custom/modules
Example:
cd /odoo18/custom
- Convert your desired folder to zip
sudo apt install zip unzip
zip -r filename.zip folder
- Goto server using ssh
ssh user@ip
- Goto your postgres user
sudo su - postgres
- Goto psql server
psql
- Check list of database you have
\l
- Came back to the psql server and Dump the desired database
pg_dump database_name > database_name_20160527.sql
- Goto the filestore folder using cd
cd /path/to/your/filestore
Example:
cd /odoo18/.local/share/Odoo/filestore
- Convert your desired folder to zip (Please zip the that match with your database name)
sudo apt install zip unzip
zip -r filename.zip folder
- Use FileZilla for uploading zipped filestore and dumped.sql file
- Goto the server where you want to restore using ssh
ssh user@ip
- Goto the folder you have uploaded zip and sql file using cd
cd /path/to/your/zip/and/sql/file
Example:
cd /odoo
- Unzip the filestore
unzip filename.zip
Example:
unzip production.zip
- Move the file to filestore
sudo mv unzipped_folder_name/ /path/to/your/filestore
Example
sudo mv filestore/ /odoo/.local/share/Odoo/filestore
- Goto server using ssh
ssh user@ip
- Goto your postgres user
sudo su - postgres
- Goto the folder you have sql file
cd /path/to/your/uploaded/sql/file
Example
cd /odoo
- Create Database and Upload
createdb -O db_user dbname
Example:
createdb -O odoo Sakan.live
psql db_name < sql_file_you_want_to_upload
Example:
psql Sakan.live < sakan.sql
- Go to settings > Technical > Parameters > System parameters
- Make a new paramater a. Name: web.base.url.freeze b. Value: True
- Edit the parameter web base.url and place the ip on http://0.0.0.0:8069
- Refresh and everything is fixed.
sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt install -f