odoo-testing-addons/export_odoo.ps1
2026-01-09 21:30:49 +05:30

20 lines
726 B
PowerShell

# Odoo Export Script for Windows (PowerShell)
# This script exports the addons folder and the PostgreSQL database from Docker.
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
$exportDir = "export_$timestamp"
New-Item -ItemType Directory -Path $exportDir
Write-Host "--- Exporting Addons ---" -ForegroundColor Cyan
Compress-Archive -Path "addons\*" -DestinationPath "$exportDir\addons.zip"
Write-Host "--- Exporting Database ---" -ForegroundColor Cyan
# Replace 'postgres' with your actual database name if different
docker exec -t odoo_client1_db pg_dump -U odoo -d postgres > "$exportDir\database.sql"
Write-Host "--- Export Complete! ---" -ForegroundColor Green
Write-Host "Project exported to directory: $exportDir"