Skip to content

Commit cbac2b0

Browse files
committed
Merge branch 'develop'
2 parents 68337c0 + befb823 commit cbac2b0

File tree

5 files changed

+142
-71
lines changed

5 files changed

+142
-71
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ bin: test src/$(PROJECT).sh
3636

3737
config: pgsql-backup.conf
3838
# Install (without overwriting) configuration files
39-
[[ -e $(DESTDIR)$(D_CNF)/pgsql-backup.conf ]] || \
39+
[ -e $(DESTDIR)$(D_CNF)/pgsql-backup.conf ] || \
4040
install -D -m 0644 $(PROJECT).conf $(DESTDIR)$(D_CNF)/pgsql-backup.conf
4141

4242
docs: $(PROJECT).pod

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Use `PREFIX` to change install location
2929
make PREFIX=/opt install
3030

3131
You will probably want the script to run on a regular basis; you can do this
32-
using cron. Create `/etc/cron.d/pgsql-backup with the following contents:
32+
using cron. Create `/etc/cron.d/pgsql-backup` with the following contents:
3333

3434
0 1 * * * root /usr/local/bin/pgsql-backup
3535

pgsql-backup.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ CONFIG_MAXATTSIZE="4000"
4343
## script uses a specific version (ie, if you have multiple instances of
4444
## postgresql installed)
4545
#CONFIG_PG_DUMP='/usr/bin/pg_dump'
46+
#CONFIG_PG_DUMPALL='/usr/bin/pg_dumpall'
4647
#CONFIG_PSQL='/usr/bin/psql'
4748
#CONFIG_GZIP='/bin/gzip'
4849
#CONFIG_BZIP2='/bin/bzip2'
@@ -60,6 +61,9 @@ CONFIG_DBEXCLUDE="template0"
6061
# Include CREATE DATABASE in backup?
6162
CONFIG_CREATE_DATABASE=yes
6263

64+
# Make a dump of the PostgreSQL globals (ie login roles)
65+
#CONFIG_DUMP_GLOBALS=yes
66+
6367
# Which day do you want weekly backups? (1 to 7 where 1 is Monday)
6468
CONFIG_DOWEEKLY=1
6569

pgsql-backup.pod

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,16 @@ Type: C<yes> or C<no>
168168

169169
Default: yes
170170

171+
=head2 CONFIG_DUMP_GLOBALS
172+
173+
Make a dump of the PostgreSQL globals (ie login roles). If set to C<yes> then
174+
pg_dumpall (NOT pg_dump) is called with with C<--globals-only> flag and output
175+
is saved to a distinct file in the C<CONFIG_BACKUPDIR> path.
176+
177+
Type: C<yes> or C<no>
178+
179+
Default: yes
180+
171181
=head2 CONFIG_DOWEEKLY
172182

173183
Which day to create a weekly archive of the dumps. Use '0' to not do weekly
@@ -337,21 +347,21 @@ A sample hook is included: F<hook-postbackup.sh>
337347

338348
=head1 SECURITY
339349

340-
Database dumps created by this script are unencrypted; you should take into
341-
consideration the following (incomplete list) of implications, especially if
342-
your database(s) store sensitive information such as usernames, passwords,
343-
credit card details or other personal information (espeically those of your
344-
customers).
350+
Database dumps created by this script are unencrypted by default; you should
351+
take into consideration the following (incomplete list) of implications,
352+
especially if your database(s) store sensitive information such as usernames,
353+
passwords, credit card details or other personal information (especially those
354+
of your customers).
345355

346356
=over 4
347357

348358
=item * When writing to disk, ensure the backup directory has restictive
349359
permissions to prevent unauthorized users gaining access to the backups.
350360

351-
=item * Use the L</POSTBACKUP> hook to encrypt your backups.
361+
=item * Enable encryption of the output files. See L</CONFIG_ENCRYPT>.
352362

353363
=item * When emailing backup dumps, avoid the emails being trasmitted over
354-
untrusted networks (ie, the internet). Internal mail systems only. Be aware
364+
untrusted networks (eg, the internet). Internal mail systems only. Be aware
355365
of mail systems that archive emails may retain copies of your backups.
356366

357367
=item * If you don't administer the email server, please respect your email

0 commit comments

Comments
 (0)