Changes between Version 5 and Version 6 of InstallationGuidelines/Linux/Server/CherokeePostgreSQL
- Timestamp:
- 11/04/11 21:56:30 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallationGuidelines/Linux/Server/CherokeePostgreSQL
v5 v6 324 324 cat << EOF > "/usr/local/bin/backup" 325 325 #!/bin/sh 326 mkdir /var/backups/eden 327 chown postgres /var/backups/eden 326 328 NOW=\$(date +"%Y-%m-%d") 327 su postgres 328 pg_dump -c sahana > /root/backup-\$NOW.sql 329 pg_dump -Fc gis > /root/gis.dmp 329 su -c - postgres "pg_dump -c sahana > /var/backups/eden/sahana-\$NOW.sql" 330 su -c - postgres "pg_dump -Fc gis > /var/backups/eden/gis.dmp" 330 331 OLD=\$(date --date='7 day ago' +"%Y-%m-%d") 331 rm -f / root/backup-\$OLD.sql332 rm -f /var/backups/eden/sahana-\$OLD.sql 332 333 EOF 333 334 chmod +x /usr/local/bin/backup