Commit 3aa234a
Changed files (3)
recipes
templates
recipes/postgres.rb
@@ -63,6 +63,8 @@ end
aws_config = node['stronglifters']['aws']['profiles']['default']
+package "python-pip"
+execute "pip install awscli"
cron 'pg_backups' do
action :create
command "#{backups_dir}/pg_backup_rotated.sh -c /etc/postgresql/pg_backup.config"
templates/pg_backup.config.erb
@@ -2,7 +2,7 @@ BACKUP_USER=
HOSTNAME="localhost"
USERNAME="postgres"
BACKUP_DIR=<%= @backup_dir %>
-S3_PATH=<%= @s3_path %>
+S3_PATH=<%= @s3_backup_path %>
SCHEMA_ONLY_LIST=""
ENABLE_CUSTOM_BACKUPS=yes
ENABLE_PLAIN_BACKUPS=yes
templates/pg_backup_rotated.sh.erb
@@ -134,4 +134,4 @@ perform_backups "-daily"
[ -z "$S3_PATH" ] && echo "no aws backup" && exit 0;
-aws s3 sync $BACKUP_DIR $S3_PATH
+/usr/local/bin/aws s3 sync $BACKUP_DIR $S3_PATH