İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Automate Odoo V8 Databases Backup

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
scriptbackupodooV8
3 Cevaplar
5745 Görünümler
Avatar
Ayham

I know that there is a module for auto backup and it was work well for me but know it makes issues with the Pysftp since Odoo with the new updates not recognize that Pysftp is installed so that I decided to make a script for automating backing up on Ubuntu Server.

This is my script:


# Backup script starts here.

#To stop Odoo service

sudo service odoo stop

#!/bin/bash

# Location of the backup logfile.

logfile="/var/odoo/log/logfile.log"

# Location to place backups.

backup_dir="/var/odoo/backups"

touch $logfile

timeslot=`date +%d-%m-%y-%H-%M-%S`

databases=`psql -U postgres -q -c "\l" | awk '{ print $1}' | grep -vE '^\||^-|^List|^Name|template[0|1]|^\('`

for i in $databases; do

timeinfo=`date '+%T %x'`

echo "Backup and Vacuum started at $timeinfo for time slot $timeslot on database: $i " >> $logfile

/usr/bin/vacuumdb -z -U postegres $i >/dev/null 2>&1

/usr/bin/pg_dump $i --port 5432 -U postgres --format=c --blobs --verbose | gzip > "$backup_dir/odoo-$i-$timeslot-database.gz"

timeinfo=`date '+%T %x'`

echo "Backup and Vacuum complete at $timeinfo for time slot $timeslot on database: $i " >> $logfile

done

#-------------------------------------------------

# delete backups more than 30 days old

find $backup_dir/Odoo* -mtime +30 -exec rm {} \;

#To start Odoo service

sudo service odoo start


#END


This script is making backups for all existing databases, but when try to restore any of them it gives me that restore unsuccessful, and when try to restore them by pg_restore command it gives me that the archive is not correct.

The backup file that generated from the web manager backup tool consist of several files but the backup that generated by pg_dump consist from only one file.

Any one can help! 

0
Avatar
Vazgeç
wizardz

I tryed to install the auto_backup modul. I have installed the pysftp but when I'm adding the auto_backup module, it says: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi execute(self.server.app) File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute application_iter = app(environ, start_response) File "/usr/lib/python2.7/dist-packages/openerp/service/server.py", line 290, in app return self.app(e, s) File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 216, in application return application_unproxied(environ, start_response) File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 202, in application_unproxied result = handler(environ, start_response) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1289, in __call__ self.load_addons() File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1310, in load_addons m = __import__('openerp.addons.' + module) File "/usr/lib/python2.7/dist-packages/openerp/modules/module.py", line 80, in load_module mod = imp.load_module('openerp.addons.' + module_part, f, path, descr) File "/opt/custom_addons/auto_backup/__init__.py", line 23, in import backup_scheduler File "/opt/custom_addons/auto_backup/backup_scheduler.py", line 33, in raise ImportError('This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)') ImportError: This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)

Avatar
Andre de Kock
En İyi Yanıt

If you make backups, the best way to do it, I've found, is:

pg_dump --host=$HOST_A --username=$USER_A --verbose $DB_NAME > /tmp/$DB_NAME.backup

And to restore:

createdb --host=$HOST_B --username=$USER_B $DB_NAME

psql --host=$HOST_B --username=$USER_B $DB_NAME < /tmp/$DB_NAME.backup

@Keng Onn:

I solved this by ensuring that any files uploaded to Odoo (any ir.attachment) is stored in the database. You do this by setting an ir.config_parameter called "ir_attachment.location" to "db". The default value is "file" which means that Odoo will by default store ir.attachment objects in the filestore.

1
Avatar
Vazgeç
Keng Onn

thanks for illustrating how you solve this :), but how do you tackle the filestore issue? as in, how to restore other stuff that is not stored in the DB? As well as meta-info such as the modules installed, etc?

Andre de Kock

@Keng Onn: see updated anwer

Avatar
Ayham
Üretici En İyi Yanıt

#Andre

Dear, I tested the commands, but when making restore the database not appeared    in the web manager page.


#Ahmed

Yes dear I checked the mentioned link before, all mentioned methods in the scripts have issues

0
Avatar
Vazgeç
Avatar
Qutechs, Ahmed M.Elmubarak
En İyi Yanıt

Dear Ayham,

Kindly check this link , if you didn't already ...

Kind Regards,


0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
Can't install auto_backup module Çözüldü
backup odooV8
Avatar
Avatar
Avatar
Avatar
Avatar
16
Eyl 20
23065
Alternates to backup?
backup odooV8
Avatar
Avatar
Avatar
3
Eyl 17
3933
Back up from Command
backup odooV8
Avatar
Avatar
2
Şub 16
4737
Need an explanation of backup formats
format backup odooV8
Avatar
1
Mar 19
6197
Backupscript for database + filestore
filestore script backup
Avatar
Avatar
1
Ağu 15
8070
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now