This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
ROOT_BACKUP_PATH=/tmp/backup | |
echo "backup path: ${ROOT_BACKUP_PATH}" | |
# Create the backup directory | |
[ -d "$ROOT_BACKUP_PATH" ] || mkdir -p $ROOT_BACKUP_PATH | |
DATABASES=`psql -ltA -d postgres -c "SELECT datname FROM pg_database WHERE datname NOT IN ('postgres', 'template0', 'template1')"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
from argparse import ArgumentParser | |
parser = ArgumentParser( | |
description='Profile loading a model\'s data for a specific view in order ' | |
'to find bottlenecks') | |
parser.add_argument('odoo_basedir') | |
parser.add_argument('odoo_cfg') | |
parser.add_argument('odoo_db') |