https://github.com/tohuwabohu/puppet-duplicity_postgresql
Puppet module to backup and restore PostgreSQL databases based on duplicity.
https://github.com/tohuwabohu/puppet-duplicity_postgresql
backup duplicity postgresql-database puppet
Last synced: 4 months ago
JSON representation
Puppet module to backup and restore PostgreSQL databases based on duplicity.
- Host: GitHub
- URL: https://github.com/tohuwabohu/puppet-duplicity_postgresql
- Owner: tohuwabohu
- License: apache-2.0
- Created: 2014-05-31T01:09:06.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-01-02T18:01:07.000Z (over 2 years ago)
- Last Synced: 2025-01-07T13:39:48.849Z (6 months ago)
- Topics: backup, duplicity, postgresql-database, puppet
- Language: Puppet
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
#duplicity_postgresql
##Overview
Backup and restore PostgreSQL databases based on duplicity. The modules makes sure a database dump is include in the
referenced duplicity backup and restores this previously taken dump in case the existing database is empty.##Usage
Make sure, the parent backup directory (`/var/backups`) is properly existing:
```
file { '/var/backups':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0644',
}
```Now you're ready to manage a database:
```
duplicity_postgresql::database { 'my-database':
profile => 'system',
}
```This will create a dump of the PostgreSQL database `my-database` each time the backup profile `system` is run. The dump
will be keep in the default backup directory. If the database is existing but empty, the dump will be restored. In case
the dump file is missing, Puppet will attempt to restore the file from the last backup.If you just want to backup the database but don't restore it, set the `ensure` parameter to `backup`:
```
duplicity_postgresql::database { 'my-database':
ensure => backup,
profile => 'system',
}
```##Limitations
The module has been tested on the following operating systems. Testing and patches for other platforms are welcome.
* Debian Linux 6.0 (Squeeze)
[](https://travis-ci.org/tohuwabohu/tohuwabohu-duplicity_postgresql)
##Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request