#!/bin/bash

pg_dump -U postgres  mobile > /home/soft/backup/mobile.`date +%Y-%m-%d.%H:%M:%S`.sql

pg_dump -U postgres  postgres > /home/soft/backup/postgres.`date +%Y-%m-%d.%H:%M:%S`.sql

pg_dump -U postgres template_postgis > /home/soft/backup/template_postgis.`date +%Y-%m-%d.%H:%M:%S`.sql

backup 目录权限 777

crontab 计划任务5小时