Backup de Odo v12

Sql y Filestore

$ cat Odoo_Backup.sh 
#/bin/bash
####            Requerimientos          ######
# sudo su - postgres -c "createuser -s $USER"
### Basdo el bacckup de Juan Carlos Montoya ######
######## Muchas gracias Juan.....#################

BACK_PATH=/home/$USER/backups
DATABASE_NAME=odoo-prod
PATH_FILESTORE=/home/odoo/.local/share/Odoo/filestore
DEST_FILESTORE=$BACK_PATH

sudo mkdir -p $BACK_PATH
sudo mkdir -p $DEST_FILESTORE
sudo chown -R $USER:root $BACK_PATH

echo "Backup: "`date +\%Y-\%m-\%d`
# pg_dump NO LLEVA SUDO
pg_dump $DATABASE_NAME | gzip > $BACK_PATH/`date +\%Y-\%m-\%d`-$DATABASE_NAME.sql.gz
sudo tar czvf $DEST_FILESTORE/`date +\%Y-\%m-\%d`-$DATABASE_NAME-filestore.tar.gz $PATH_FILESTORE
sudo chown -R $USER:$USER *

Todavía falta cosas que hacer....