Skip to content

Commit 69f858c

Browse files
Remove deprecated backup functionality
1 parent ebb707e commit 69f858c

10 files changed

+3
-374
lines changed

README.md

+2-51
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ Table of Contents
66
- [What does this module provide?](#what-does-this-module-provide)
77
- [Usage](#usage)
88
- [Items you may want to configure](#items-you-may-want-to-configure)
9-
- [Backup Schedule](#backup-schedule)
10-
- [Backup Retention Policy](#backup-retention-policy)
119
- [Disable Maintenance](#disable-maintenance)
1210
- [General PostgreSQL Recommendations](#general-postgresql-recommendations)
1311
- [Tuning](#tuning)
14-
- [Backups](#backups)
1512
- [Maintenance](#maintenance)
1613
- [PostgreSQL Settings](#postgresql-settings)
1714
- [maintenance_work_mem](#maintenance_work_mem)
@@ -23,17 +20,14 @@ Table of Contents
2320

2421
# Overview
2522

26-
This module provides tuning, maintenance, and backups for PE PostgreSQL.
23+
This module provides tuning, and maintenance for PE PostgreSQL.
2724

2825
## What does this module provide?
2926

3027
This module provides the following functionaility
3128

3229
1. Customized settings for PE PostgreSQL
3330
1. Maintenance to keep the `pe-puppetdb` database lean and fast
34-
1. Backups for all PE PostgreSQL databases, disabled by default
35-
- The `pe-puppetdb` database is backed up every week
36-
- Other databases are backed up every night
3731

3832
## Usage
3933

@@ -46,34 +40,12 @@ It is not recommended to classify using a pre-existing node group in the PE Cons
4640

4741
## Items you may want to configure
4842

49-
### Backup Schedule
5043

51-
> WARNING: The backup functionality in this module has been deprecated and will be removed in a future release.
44+
> WARNING: The backup functionality in this module has been removed.
5245
Please refer to the [PE Backup and Restore documentation](https://puppet.com/docs/pe/latest/backing_up_and_restoring_pe.html) for details on how to backup.
5346
You should ensure the parameter `pe_databases::manage_database_backups` and any parameters from the `pe_databases::backup` class are removed from classification or hiera.
5447
You should also clean up associated crontab entries.
5548

56-
Backups are not activated by default but can be enabled by setting the following parameter:
57-
58-
Hiera classification example
59-
60-
```
61-
pe_databases::manage_database_backups:: true
62-
```
63-
64-
You can modify the default backup schedule by provide an array of hashes that describes the databases to backup and their backup schedule.
65-
Please refer to the [hieradata_examples](https://github.com/puppetlabs/puppetlabs-pe_databases/tree/main/hieradata_examples) directory of this repository for examples.
66-
67-
> IMPORTANT NOTE: If you change the default schedule, it will stop managing the associated crontab entries, and there's not a clean way to automatically remove unmanaged crontab entries.
68-
So you should delete all pe-postgres crontab entries via `crontab -r -u pe-postgres` and let Puppet repopulate them if you change the default schedule.
69-
Otherwise, you will create duplicate backups.
70-
71-
### Backup Retention Policy
72-
73-
By default, the backup script will retain two backups for each database.
74-
When the backup script runs, it will remove the older of the two backups before starting the backup itself.
75-
You can configure the retention policy by setting `pe_databases::backup::retention_policy: <NUMBER_OF_BACKUPS_TO_RETAIN>`.
76-
7749
### Disable Maintenance
7850

7951
The maintenance systemd timers will perform a `pg_repack` on various `pe-puppetdb` tables to keep them lean and fast.
@@ -93,27 +65,6 @@ If you are using a dedicated node for PE PostgreSQL, then some of the settings c
9365
This module attempts to provide default settings that accommodate both a Monolithic install and a dedicated PE PostgreSQL instance.
9466
Those defaults change based on the `$all_in_one_pe` parameter.
9567

96-
## Backups
97-
98-
> WARNING: The backup functionality in this module has been deprecated and will be removed in a future release.
99-
Please refer to the [PE Backup and Restore documentation](https://puppet.com/docs/pe/latest/backing_up_and_restoring_pe.html) for details on how to backup.
100-
You should ensure the parameter `pe_databases::manage_database_backups` and any parameters from the `pe_databases::backup` class are removed from classification or hiera.
101-
You should also clean up associated crontab entries.
102-
103-
This is the documentation for Pupet Enterprise backups:
104-
105-
https://puppet.com/docs/pe/latest/backing_up_and_restoring_pe.html
106-
107-
This module provides an alternative to backup just the PE PostgreSQL databases.
108-
109-
It is recommended that you backup each database individually so that if you have an issue with one database you do not have to restore all databases.
110-
111-
Under ideal conditions you would backup all databases daily, however, backing up large databases such as `pe-puppetdb`, results in excessive disk I/O so you may prefer to backup `pe-puppetdb` weekly while backing up the rest of the smaller databases daily.
112-
113-
The choice to backup `pe-puppetdb` more frequently should be based on the business needs.
114-
115-
This module provides a script for backing up PE PostgreSQL databases and two default cron jobs: one weekly to back up the `pe-puppetdb` database, and one daily to backup every database except `pe-puppetdb`.
116-
11768
## Maintenance
11869

11970
This module provides systemd timers to pg_repack tables in the `pe-puppetdb` database:

files/puppet_enterprise_database_backup.sh

-85
This file was deleted.

hieradata_examples/backup_schedule_alt_example_1.yaml

-30
This file was deleted.

hieradata_examples/backup_schedule_alt_example_2.yaml

-50
This file was deleted.

hieradata_examples/backup_schedule_default.yaml

-19
This file was deleted.

manifests/backup.pp

-90
This file was deleted.

manifests/init.pp

+1-11
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,7 @@
4343
include pe_databases::postgresql_settings::table_settings
4444
}
4545
}
46-
# Because this parameter is a value of undef with a data type of Undef,
47-
# We can the NotUndef type to determine if the value has been set
48-
if $manage_database_backups =~ NotUndef {
49-
class { 'pe_databases::backup':
50-
disable_maintenance => ! $manage_database_backups,
51-
}
52-
notify { 'pe_databases_backup_deprecate_warn':
53-
message => 'The backup functionality in the pe_databases module has been deprecated and will be removed in a future release',
54-
loglevel => warning,
55-
}
56-
}
46+
5747
}
5848
else {
5949
notify { 'pe_databases_version_warn':

0 commit comments

Comments
 (0)