odoo-backup-strategy
What it does
This tool helps you create safety copies (backups) of your Odoo system, including important data and files. It also guides you on how to restore everything if something goes wrong.
When to use it
- βWhen you need to set up a backup system for Odoo.
- βTo automate daily backups.
- βIf Odoo stops working or data gets corrupted.
Skill link
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-backup-strategy/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHelp me set up an automatic daily backup for my Odoo and upload it to the cloud.β
5 new skills a week. 1 minute to read.
How it works
You tell me about your Odoo server setup, and I'll create a script to make the backup. If you need to recover, I'll provide step-by-step instructions.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Odoo Backup Strategy
Overview
A complete Odoo backup must include both the PostgreSQL database and the filestore (attachments, images). This skill covers manual and automated backup procedures, offsite storage, and the correct restore sequence to bring a down Odoo instance back online.
When to Use This Skill
- Setting up a backup strategy for a production Odoo instance.
- Automating daily backups with shell scripts and cron.
- Restoring Odoo after a server failure or data corruption event.
- Diagnosing a failed backup or corrupt restore.
How It Works
- Activate: Mention
@odoo-backup-strategyand describe your server environment. - Generate: Receive a complete backup script tailored to your setup.
- Restore: Get step-by-step restore instructions for any failure scenario.
Examples
Example 1: Manual Database + Filestore Backup
#!/bin/bash
# backup_odoo.sh
DATE=$(date +%Y%m%d_%H%M%S)
DB_NAME="odoo"
DB_USER="odoo"
FILESTORE_PATH="/var/lib/odoo/.local/share/Odoo/filestore/$DB_NAME"
BACKUP_DIR="/backups/odoo"
mkdir -p "$BACKUP_DIR"
# Step 1: Dump the database
pg_dump -U $DB_USER -Fc $DB_NAME > "$BACKUP_DIR/db_$DATE.dump"
# Step 2: Archive the filestore
tar -czf "$BACKUP_DIR/filestore_$DATE.tar.gz" -C "$FILESTORE_PATH" .
echo "β
Backup complete: db_$DATE.dump + filestore_$DATE.tar.gz"
Example 2: Automate with Cron (daily at 2 AM)
# Run: crontab -e
# Add this line:
0 2 * * * /opt/scripts/backup_odoo.sh >> /var/log/odoo_backup.log 2>&1
Example 3: Upload to S3 (after backup)
# Add to backup script after tar command:
aws s3 cp "$BACKUP_DIR/db_$DATE.dump" s3://my-odoo-backups/db/
aws s3 cp "$BACKUP_DIR/filestore_$DATE.tar.gz" s3://my-odoo-backups/filestore/
# Optional: Delete local backups older than 7 days
find "$BACKUP_DIR" -type f -mtime +7 -delete
Example 4: Full Restore Procedure
# Step 1: Stop Odoo
docker compose stop odoo # or: systemctl stop odoo
# Step 2: Recreate and restore the database
# (--clean alone fails if the DB doesn't exist; drop and recreate first)
dropdb -U odoo odoo 2>/dev/null || true
createdb -U odoo odoo
pg_restore -U odoo -d odoo db_YYYYMMDD_HHMMSS.dump
# Step 3: Restore the filestore
FILESTORE=/var/lib/odoo/.local/share/Odoo/filestore/odoo
rm -rf "$FILESTORE"/*
tar -xzf filestore_YYYYMMDD_HHMMSS.tar.gz -C "$FILESTORE"/
# Step 4: Restart Odoo
docker compose start odoo
# Step 5: Verify β open Odoo in the browser and check:
# - Can you log in?
# - Are recent records visible?
# - Are file attachments loading?
Best Practices
- β Do: Test restores monthly in a staging environment β a backup you've never restored is not a backup.
- β Do: Follow the 3-2-1 rule: 3 copies, 2 different media types, 1 offsite copy (e.g., S3 or a remote server).
- β Do: Back up immediately before every Odoo upgrade β this is your rollback point.
- β
Do: Verify backup integrity:
pg_restore --list backup.dumpshould complete without errors. - β Don't: Back up only the database without the filestore β all attachments and images will be missing after a restore.
- β Don't: Store backups on the same disk or same server as Odoo β a disk or server failure destroys both.
- β Don't: Run
pg_restore --cleanagainst a non-existent database β always create the database first.
Limitations
- Does not cover Odoo.sh built-in backups β Odoo.sh has its own backup system accessible from the dashboard.
- This script assumes a single-database Odoo setup. Multi-database instances require looping over all databases.
- Filestore path may differ between installations (Docker volume vs. bare-metal). Always verify the path with
odoo-bin shellbefore running a restore. - Large filestores (100GB+) may require incremental backup tools like
rsyncorresticrather than fulltar.gzarchives.
FAQ
What is the 'filestore'?
It's where Odoo stores all the files you upload, like images and attached documents.
Why shouldn't I store backups on the same server as Odoo?
If the server fails, you lose both Odoo and the backups. It's better to have a copy elsewhere.
Do I need to test if the backup works?
Yes! It's very important to test restores regularly to make sure the backups are good.
Details
Original description by the author
Complete Odoo backup and restore strategy: database dumps, filestore backup, automated scheduling, cloud storage upload, and tested restore procedures.
Popularity
- GitHub stars
- 48k
- Ranking position
- #5335
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
00-andruia-consultant
48kHelps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
007
48kLets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
10-andruia-skill-smith
48kHelps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
20-andruia-niche-intelligence
48kLets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.