1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2025-09-13 07:49:29 +00:00

11 Commits
1.0.2 ... 1.1.0

Author SHA1 Message Date
Norbert Varzariu
283ade9782 bump version 2017-04-02 10:19:18 +02:00
Norbert Varzariu
1feea03aaa removed single quotes in misc script template 2016-06-27 13:21:03 +02:00
Norbert Varzariu
a37c7f71ea Merge branch 'release/1.0.3' into develop
- fix ordering of monthday and month in cron
2016-03-29 16:17:58 +02:00
Norbert Varzariu
93be1c12ac bump version 2016-03-29 16:16:19 +02:00
Norbert Varzariu
ea87bf924a Merge pull request #1 from nerdlich/patch-1
Correct order of monthday/month
2016-03-28 13:36:54 +02:00
nerdlich
c79d1c7fc6 Correct order of monthday/month 2016-03-24 22:53:52 +01:00
Norbert Varzariu
98519a8ebc Merge branch 'develop' 2016-01-26 08:29:52 +01:00
Norbert Varzariu
a386a710b7 quote psql password in scripts 2016-01-26 08:29:42 +01:00
Norbert Varzariu
0c5afff356 Merge branch 'release/1.0.2' into develop 2016-01-25 09:48:38 +01:00
Norbert Varzariu
3c9357f3fe Merge branch 'release/1.0.2'
- Update README
2016-01-25 09:48:18 +01:00
Norbert Varzariu
1fe21e5bba Merge branch 'release/1.0.1'
- small fixes to psql backup script
2016-01-25 09:41:03 +01:00
5 changed files with 5 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "loomsen-rsnapshot", "name": "loomsen-rsnapshot",
"version": "1.0.2", "version": "1.1.0",
"author": "loomsen", "author": "loomsen",
"summary": "Configures rsnapshot.", "summary": "Configures rsnapshot.",
"license": "Apache-2.0", "license": "Apache-2.0",

View File

@@ -1 +1 @@
<%= @minute %> <%= @hour %> <%= @month %> <%= @monthday %> <%= @weekday %> root /usr/bin/rsnapshot -c <%= @config %> <%= @level %> <%= @minute %> <%= @hour %> <%= @monthday %> <%= @month %> <%= @weekday %> root /usr/bin/rsnapshot -c <%= @config %> <%= @level %>

View File

@@ -2,6 +2,6 @@
#This file is managed by puppet #This file is managed by puppet
# #
<%@commands.each do |command| -%> <%@commands.each do |command| -%>
ssh -l <%=@backup_user-%> <%=@host-%> '<%=command-%>' ssh -l <%=@backup_user-%> <%=@host-%> <%=command-%>
<%end-%> <%end-%>

View File

@@ -5,7 +5,6 @@
# #
host=<%=@host%> host=<%=@host%>
user=<%=@dbbackup_user%> user=<%=@dbbackup_user%>
pass=<%=@dbbackup_password%>
<% if (@dbbackup_user == 'root' && @dbbackup_password == '') -%> <% if (@dbbackup_user == 'root' && @dbbackup_password == '') -%>
dbs=( dbs=(

View File

@@ -5,14 +5,12 @@
# #
host=<%=@host%> host=<%=@host%>
user=<%=@dbbackup_user%> user=<%=@dbbackup_user%>
pass=<%=@dbbackup_password%>
#PGPASSWORD="$pass"
dbs=( dbs=(
$(ssh -l <%=@backup_user-%> "$host" "PGPASSWORD=${pass} psql -U ${user} -Atc \"SELECT datname FROM pg_database WHERE NOT datistemplate AND NOT datname ~ '<%@ignore_dbs.each do |db|-%><%if db == @ignore_dbs.last-%><%=db-%><%else-%><%=db-%>|<%end-%><%end-%>'\"") $(ssh -l <%=@backup_user-%> "$host" "PGPASSWORD='<%=@dbbackup_password%>' psql -U ${user} -Atc \"SELECT datname FROM pg_database WHERE NOT datistemplate AND NOT datname ~ '<%@ignore_dbs.each do |db|-%><%if db == @ignore_dbs.last-%><%=db-%><%else-%><%=db-%>|<%end-%><%end-%>'\"")
) )
for db in "${dbs[@]}"; do for db in "${dbs[@]}"; do
ssh -l <%=@backup_user-%> "$host" "PGPASSWORD=${pass} <%=@dumper-%> -U ${user} <%=@dump_flags-%> ${db}" > "$db".sql ssh -l <%=@backup_user-%> "$host" "PGPASSWORD='<%=@dbbackup_password%>' <%=@dumper-%> -U ${user} <%=@dump_flags-%> ${db}" > "$db".sql
wait wait
<% if @compress != '' -%> <% if @compress != '' -%>
<%=@compress-%> "$db".sql <%=@compress-%> "$db".sql