Browse Source

Merge pull request #257 from T3hUb3rK1tten/upstream-pr

Backup postgres to .sql without needing restart of service & Increase cipher suite level
Luke Cyca 11 years ago
parent
commit
4892a2725b

+ 3
- 0
roles/mailserver/templates/etc_postfix_main.cf.j2 View File

@@ -45,6 +45,9 @@ smtp_tls_loglevel = 2
45 45
 smtpd_tls_received_header = yes
46 46
 smtp_tls_note_starttls_offer = yes
47 47
 smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
48
+# http://www.postfix.org/FORWARD_SECRECY_README.html
49
+smtp_tls_ciphers = medium
50
+
48 51
 
49 52
 smtpd_sasl_type = dovecot
50 53
 smtpd_sasl_path = private/auth

+ 6
- 6
roles/tarsnap/files/tarsnap.sh View File

@@ -4,7 +4,7 @@
4 4
 # Written by Tim Bishop, 2009.
5 5
 
6 6
 # Directories to backup (relative to /)
7
-DIRS="home root decrypted var/www var/lib/postgresql/9.1/main"
7
+DIRS="home root decrypted var/www"
8 8
 
9 9
 # Number of daily backups to keep
10 10
 DAILY=7
@@ -54,8 +54,11 @@ else
54 54
 	BACKUP="$YEAR$MOY$DOM-$TIME-daily"
55 55
 fi
56 56
 
57
-# Stop postgres
58
-monit stop postgres
57
+# Below command complains to stderr if postgres user cannot write to CWD
58
+cd /home/
59
+
60
+# Dump PostgreSQL to file
61
+sudo -u postgres pg_dumpall -c > /decrypted/postgresql-backup.sql
59 62
 
60 63
 # Do backups
61 64
 for dir in $DIRS; do
@@ -63,9 +66,6 @@ for dir in $DIRS; do
63 66
 	$TARSNAP $EXTRA_FLAGS -c -f $BACKUP-$dir $dir
64 67
 done
65 68
 
66
-# Start postgres
67
-monit start postgres
68
-
69 69
 # Backups done, time for cleaning up old archives
70 70
 
71 71
 # using tail to find archives to delete, but its

Loading…
Cancel
Save