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


Ignore:
Timestamp:
10/26/11 20:27:51 (13 years ago)
Author:
Fran Boon
Comment:

Escape the $ in the created backup shell script

Legend:

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

    v4 v5  
    324324cat << EOF > "/usr/local/bin/backup"
    325325#!/bin/sh
    326 NOW=$(date +"%Y-%m-%d")
     326NOW=\$(date +"%Y-%m-%d")
    327327su postgres
    328 pg_dump -c sahana > /root/backup-$NOW.sql
     328pg_dump -c sahana > /root/backup-\$NOW.sql
    329329pg_dump -Fc gis > /root/gis.dmp
    330 OLD=$(date --date='7 day ago' +"%Y-%m-%d")
    331 rm -f /root/backup-$OLD.sql
     330OLD=\$(date --date='7 day ago' +"%Y-%m-%d")
     331rm -f /root/backup-\$OLD.sql
    332332EOF
    333333chmod +x /usr/local/bin/backup