Giter Site home page Giter Site logo

odoo-backup-aws-s3's Introduction

About

This script is designed to backup Odoo databases and filestores to AWS S3.

Instructions

  1. Create a secret folder containing the following files:

    • db.json

      {
          "db_host": "localhost",
          "db_user": "odoo",
          "db_password": "odoo",
          "db_port": 5432,
          "db_name": "odoo_database_name"
      }
    • server.json

      {
        "server_host": "12.34.56.78",
        "server_user": "root",
        "server_port": 22,
        "key_file": "private-key.pem - private key file to ssh to server - add the key file with the same name to the secret folder",
        "datadir_path": "datadir_folder_path",
        "odoo_docker_image": "if your Odoo server is running on host, ignore this parameter",
        "telegram_token": "telegram_bot_token_to_send_notifications",
        "telegram_channel": "telegram_channel_id"
      }
    • credentials

      [default]
      aws_access_key_id = YOUR_ACCESS_KEY
      aws_secret_access_key = YOUR_SECRET_KEY
      
    • config

      [default]
      region=us-east-1
      
  2. Run the docker command, this will create a container with a cronjob run everyday, at 00:00

    docker run -d xmars/odoo-backup-aws-s3 -v <secret_folder_path>:/root/.aws
    
  3. (Optional) If you want to run backup.py script directly, create secret files in '~/.aws' and run script

    python3 -m venv venv
    source venv/bin/activate && pip install -r requirements.txt 
    BACKUP_SECRET_PATH=<secret_folder_path> AWS_SHARED_CREDENTIALS_FILE=<secret_folder_path>/credentials AWS_CONFIG_FILE=<secret_folder_path>/config python3 backup.py

odoo-backup-aws-s3's People

Contributors

xmars4 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.