Added /var/rhizo_backups directory for backups

Added backups cron jobs
This commit is contained in:
Ciaby 2015-05-15 15:33:36 -05:00
parent 3c968f1beb
commit fa9aee21cb
2 changed files with 22 additions and 2 deletions

View file

@ -34,7 +34,11 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn
*/5 * * * * root /var/rhizomatica/bin/monitor_rapi.sh > /dev/null 2>&1 */5 * * * * root /var/rhizomatica/bin/monitor_rapi.sh > /dev/null 2>&1
#Billing #Billing
00 10 * * * root [[ $(date +'%d') -eq $(cal | awk '!/^$/{ print $NF }' | grep -v '^ ' | tail -1) ]] && /var/rhizomatica/bin/active_subscribers.sh 0 10 * * * root [[ $(date +'%d') -eq $(cal | awk '!/^$/{ print $NF }' | grep -v '^ ' | tail -1) ]] && /var/rhizomatica/bin/active_subscribers.sh
#Restart osmo-nitb every 6 hours #Restart osmo-nitb every 6 hours
00 */6 * * * root /usr/bin/sv restart osmo-nitb 2&>1 /dev/null 0 */6 * * * root /usr/bin/sv restart osmo-nitb 2&>1 /dev/null
#PostgreSQL backup
0 3 * * * postgres /home/rhizomatica/bin/pg_backup_rotated.sh
0 4 * * * root /home/rhizomatica/bin/sqlite_backup_rotated.sh

View file

@ -156,6 +156,22 @@ class rhizomatica_base_system {
ensure => directory, ensure => directory,
} }
file { '/var/rhizo_backups':
ensure => directory,
}
file { '/var/rhizo_backups/postgresql':
ensure => directory,
owner => 'postgres',
group => 'postgres',
require => File['/var/rhizo_backups'],
}
file { '/var/rhizo_backups/sqlite':
ensure => directory,
require => File['/var/rhizo_backups'],
}
package { 'git': package { 'git':
ensure => present, ensure => present,
} }