Changes between Version 5 and Version 6 of InstallationGuidelines/Linux/Server/CherokeePostgreSQL


Ignore:
Timestamp:
11/04/11 21:56:30 (10 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/Linux/Server/CherokeePostgreSQL

    v5 v6  
    324324cat << EOF > "/usr/local/bin/backup"
    325325#!/bin/sh
     326mkdir /var/backups/eden
     327chown postgres /var/backups/eden
    326328NOW=\$(date +"%Y-%m-%d")
    327 su postgres
    328 pg_dump -c sahana > /root/backup-\$NOW.sql
    329 pg_dump -Fc gis > /root/gis.dmp
     329su -c - postgres "pg_dump -c sahana > /var/backups/eden/sahana-\$NOW.sql"
     330su -c - postgres "pg_dump -Fc gis > /var/backups/eden/gis.dmp"
    330331OLD=\$(date --date='7 day ago' +"%Y-%m-%d")
    331 rm -f /root/backup-\$OLD.sql
     332rm -f /var/backups/eden/sahana-\$OLD.sql
    332333EOF
    333334chmod +x /usr/local/bin/backup