/[smecontribs]/rpms/smeserver-rdiff-backup/contribs7/smeserver-rdiff-backup-0.0.1-remotebackups.patch
ViewVC logotype

Annotation of /rpms/smeserver-rdiff-backup/contribs7/smeserver-rdiff-backup-0.0.1-remotebackups.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Tue Nov 25 16:20:29 2008 UTC (16 years ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
Restore

1 slords 1.1 diff -Nur -x '*.orig' -x '*.rej' smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/EnableLocal mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/EnableLocal
2     --- smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/EnableLocal 1970-01-01 10:00:00.000000000 +1000
3     +++ mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/EnableLocal 2006-05-18 12:27:37.151346634 +1000
4     @@ -0,0 +1 @@
5     +yes
6     diff -Nur -x '*.orig' -x '*.rej' smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/EnableRemote mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/EnableRemote
7     --- smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/EnableRemote 1970-01-01 10:00:00.000000000 +1000
8     +++ mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/EnableRemote 2006-05-18 12:27:33.139046716 +1000
9     @@ -0,0 +1 @@
10     +no
11     diff -Nur -x '*.orig' -x '*.rej' smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/RemoteHost mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/RemoteHost
12     --- smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/RemoteHost 1970-01-01 10:00:00.000000000 +1000
13     +++ mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/RemoteHost 2006-05-18 12:06:09.610028678 +1000
14     @@ -0,0 +1 @@
15     +localhost
16     diff -Nur -x '*.orig' -x '*.rej' smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/RemotePath mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/RemotePath
17     --- smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/RemotePath 1970-01-01 10:00:00.000000000 +1000
18     +++ mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/etc/e-smith/db/configuration/defaults/rdiff-backup/RemotePath 2006-05-18 12:27:24.088625883 +1000
19     @@ -0,0 +1 @@
20     +/media/usbdisk/rdiff-backup
21     diff -Nur -x '*.orig' -x '*.rej' smeserver-rdiff-backup-0.0.1/root/etc/e-smith/templates/root/.ssh/config/50rdiff-backup mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/etc/e-smith/templates/root/.ssh/config/50rdiff-backup
22     --- smeserver-rdiff-backup-0.0.1/root/etc/e-smith/templates/root/.ssh/config/50rdiff-backup 1970-01-01 10:00:00.000000000 +1000
23     +++ mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/etc/e-smith/templates/root/.ssh/config/50rdiff-backup 2006-05-18 12:44:58.209946495 +1000
24     @@ -0,0 +1,22 @@
25     +{
26     + return "# rdiff-backup: EnableRemote is no"
27     + if (${'rdiff-backup'}{EnableRemote} ne 'yes');
28     +
29     + my $host = ${'rdiff-backup'}{RemoteHost} || 'localhost';
30     +
31     + return "# rdiff-backup: RemoteHost is localhost"
32     + if ($host eq 'localhost');
33     +
34     + my $identity = ${'rdiff-backup'}{RemoteIdentity} || undef;
35     +
36     + return "# rdiff-backup: No RemoteIdentity for $host"
37     + if (!$identity);
38     +
39     + $OUT =<<"END_OF_HERE";
40     +
41     +Host rdiff-backup-$host
42     + Hostname $host
43     + IdentityFile $identity
44     +
45     +END_OF_HERE
46     +}
47     diff -Nur -x '*.orig' -x '*.rej' smeserver-rdiff-backup-0.0.1/root/sbin/e-smith/do_rdiff-backup mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/sbin/e-smith/do_rdiff-backup
48     --- smeserver-rdiff-backup-0.0.1/root/sbin/e-smith/do_rdiff-backup 2006-05-18 12:51:51.415034961 +1000
49     +++ mezzanine_patched_smeserver-rdiff-backup-0.0.1/root/sbin/e-smith/do_rdiff-backup 2006-05-18 12:51:42.770539174 +1000
50     @@ -1,28 +1,61 @@
51     #!/bin/sh
52     +#----------------------------------------------------------------------
53     +# smeserver-rdiff-backup
54     +# Copyright (C) 2005-2006 Gordon Rowell <gordonr@gormand.com.au>
55     +#
56     +# This program is free software; you can redistribute it and/or modify
57     +# it under the terms of the GNU General Public License as published by
58     +# the Free Software Foundation; either version 2 of the License, or
59     +# (at your option) any later version.
60     +#
61     +# This program is distributed in the hope that it will be useful,
62     +# but WITHOUT ANY WARRANTY; without even the implied warranty of
63     +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64     +# GNU General Public License or more details.
65     +#
66     +# You should have received a copy of the GNU General Public License
67     +# along with this program; if not, write to the Free Software
68     +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
69     +#----------------------------------------------------------------------
70    
71     -/sbin/e-smith/config get rdiff-backup || exit 0
72     +/sbin/e-smith/config get rdiff-backup >/dev/null || exit 0
73    
74     -BACKUP_PATH=$(/sbin/e-smith/config getprop rdiff-backup BackupPath)
75     -
76     -if [ ! -d $BACKUP_PATH ]
77     -then
78     - echo "$BACKUP_PATH does not exist - is it mounted?"
79     - exit 1
80     -fi
81     +ID=$(/sbin/e-smith/config getprop sysconfig SystemID)
82    
83     FORCE="--force"
84    
85     -ID=$(/sbin/e-smith/config getprop sysconfig SystemID)
86     +RDIFF_BACKUP="/usr/bin/rdiff-backup"
87     +OPTIONS="--include-globbing-filelist /etc/rdiff-backup.filelist"
88     +OPTIONS="$OPTIONS --exclude /"
89     +OPTIONS="$OPTIONS $FORCE"
90     +
91     +/sbin/e-smith/signal-event pre-backup || exit 1
92    
93     -DIR=$BACKUP_PATH/$ID
94     +if [ $(/sbin/e-smith/config getprop rdiff-backup EnableLocal) = 'yes' ]
95     +then
96     + BACKUP_PATH=$(/sbin/e-smith/config getprop rdiff-backup BackupPath)
97     +
98     + if [ ! -d $BACKUP_PATH ]
99     + then
100     + echo "$BACKUP_PATH does not exist - is it mounted?"
101     + exit 2
102     + fi
103     +
104     + $RDIFF_BACKUP $OPTIONS / $BACKUP_PATH/$ID || exit 3
105     +fi
106    
107     -[ -d $DIR ] || mkdir -p $DIR
108     +if [ $(/sbin/e-smith/config getprop rdiff-backup EnableRemote) = 'yes' ]
109     +then
110     + REMOTE_PATH=$(/sbin/e-smith/config getprop rdiff-backup RemotePath)
111    
112     -/sbin/e-smith/signal-event pre-backup || exit 2
113     + REMOTE_HOST=$(/sbin/e-smith/config getprop rdiff-backup RemoteHost)
114    
115     -/usr/bin/rdiff-backup --include-globbing-filelist /etc/rdiff-backup.filelist \
116     - --exclude / \
117     - $FORCE \
118     - / $DIR || exit 3
119     + if [ $REMOTE_HOST = "localhost" ]
120     + then
121     + echo "$0: Skipping remote backup to localhost"
122     + else
123     + $RDIFF_BACKUP $OPTIONS / $REMOTE_HOST::$REMOTE_PATH/$ID || exit 4
124     + fi
125     +fi
126    
127     -/sbin/e-smith/signal-event post-backup || exit 4
128     +/sbin/e-smith/signal-event post-backup || exit 5

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed