diff -Nru zentyal-ebackup-3.1.3/ChangeLog zentyal-ebackup-3.1.4/ChangeLog --- zentyal-ebackup-3.1.3/ChangeLog 2013-08-05 10:21:17.000000000 +0000 +++ zentyal-ebackup-3.1.4/ChangeLog 2013-08-19 11:46:52.000000000 +0000 @@ -1,3 +1,9 @@ +3.1.4 + + Exclude / by default for coherency with the rest of modules like + firewall or proxy, and also allow now to include / + + Do not show default excludes like /dev or /proc on the interface, + they now can be customized in /etc/zentyal/ebackup.conf + + Fixed SCP method setting HOME environment in duplicity-wrapper 3.1.3 + Added menu icon 3.1.2 diff -Nru zentyal-ebackup-3.1.3/conf/ebackup.conf zentyal-ebackup-3.1.4/conf/ebackup.conf --- zentyal-ebackup-3.1.3/conf/ebackup.conf 2013-08-05 10:21:17.000000000 +0000 +++ zentyal-ebackup-3.1.4/conf/ebackup.conf 2013-08-19 11:46:52.000000000 +0000 @@ -13,6 +13,9 @@ # # key = value # this is ignored +# Default excludes +ebackup_default_excludes=/dev /proc /sys /mnt /media /tmp /var/spool /var/cache /var/tmp + # Enable ebackup menu (yes or no) ebackup_menu_enabled = yes diff -Nru zentyal-ebackup-3.1.3/debian/changelog zentyal-ebackup-3.1.4/debian/changelog --- zentyal-ebackup-3.1.3/debian/changelog 2013-08-05 10:21:17.000000000 +0000 +++ zentyal-ebackup-3.1.4/debian/changelog 2013-08-19 11:46:53.000000000 +0000 @@ -1,3 +1,9 @@ +zentyal-ebackup (3.1.4) precise; urgency=low + + * New upstream release + + -- José A. Calvo Mon, 19 Aug 2013 13:46:53 +0200 + zentyal-ebackup (3.1.3) precise; urgency=low * New upstream release diff -Nru zentyal-ebackup-3.1.3/ebox_backup zentyal-ebackup-3.1.4/ebox_backup --- zentyal-ebackup-3.1.3/ebox_backup 2013-08-05 10:21:17.000000000 +0000 +++ zentyal-ebackup-3.1.4/ebox_backup 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -hostname | last update | status | size | rotate | action (enable/disable) - -test connectivity (cuando se habilite) - capturamos el ssh fingerprint, guardandolo y se comprobará con el slbackup - -manage includes and excludes per host -gen server key -show stuff tu put in authorized_keys -manage clients ssh pub key -show diffs, stats and logs per diff too -restore? -show file tree? - -borrar un host - -añadir un host diff -Nru zentyal-ebackup-3.1.3/src/EBox/EBackup/Model/RemoteExcludes.pm zentyal-ebackup-3.1.4/src/EBox/EBackup/Model/RemoteExcludes.pm --- zentyal-ebackup-3.1.3/src/EBox/EBackup/Model/RemoteExcludes.pm 2013-08-05 10:21:17.000000000 +0000 +++ zentyal-ebackup-3.1.4/src/EBox/EBackup/Model/RemoteExcludes.pm 2013-08-19 11:46:52.000000000 +0000 @@ -25,6 +25,7 @@ # # +use EBox::Config; use EBox::Global; use EBox::Gettext; use EBox::Types::Select; @@ -35,9 +36,6 @@ use Error qw(:try); use String::ShellQuote; -use constant DEFAULT_EXCLUDES => ('/dev', '/proc', '/sys', '/mnt', '/media', '/tmp', - '/var/spool', '/var/cache', '/var/tmp'); - # Group: Public methods # Constructor: new @@ -105,7 +103,7 @@ defaultEnabledValue => 1, insertPosition => 'front', help => __( -'A file or directory is included or excluded according the first match. A directory match is applied to all it contents. Files not explicitly excluded or included are included' +'A file or directory is included or excluded according the first match. A directory match is applied to all it contents. Anything that is not included is excluded by default.' ), }; @@ -113,26 +111,6 @@ } -# Method: syncRows -# -# Needed to add the default excludes the first time or if the list is empty -# -# Overrides -# -sub syncRows -{ - my ($self, $currentIds) = @_; - unless (@{$currentIds}) { - # if there are no rows, we have to add them - foreach my $exclude (DEFAULT_EXCLUDES) { - $self->add(type => 'exclude_path', target => $exclude); - } - return 1; - } - - return 0; -} - sub _types { return [ @@ -235,7 +213,13 @@ my ($self) = @_; my $args = ''; - foreach my $id (@{ $self->ids() }) { + my $defaultExcludes = EBox::Config::configkey('ebackup_default_excludes'); + my @excludes = split (' ', $defaultExcludes); + foreach my $exclude (@excludes) { + $args .= "--exclude=$exclude "; + } + + foreach my $id (@{$self->ids()}) { my $row = $self->row($id); my $type = $row->valueByName('type'); if ($type eq 'exclude_path') { @@ -243,12 +227,6 @@ $args .= "--exclude=$path "; } elsif ($type eq 'include_path') { my $path = shell_quote($row->valueByName('target')); - if ($path eq '/') { - EBox::warn( - q{Not neccesary to include '/' directory in ebackup. Ignoring} - ); - next; - } $args .= "--include=$path "; } elsif ($type eq 'exclude_regexp') { my $regexp = shell_quote($row->valueByName('target')); @@ -256,6 +234,8 @@ } } + $args .= "--exclude / "; + return $args; } diff -Nru zentyal-ebackup-3.1.3/src/scripts/duplicity-wrapper zentyal-ebackup-3.1.4/src/scripts/duplicity-wrapper --- zentyal-ebackup-3.1.3/src/scripts/duplicity-wrapper 2013-08-05 10:21:17.000000000 +0000 +++ zentyal-ebackup-3.1.4/src/scripts/duplicity-wrapper 2013-08-19 11:46:52.000000000 +0000 @@ -45,6 +45,8 @@ } @ARGV; } +$ENV{HOME} = '/root'; + # set remote server password my $password = EBox::EBackup::Password::passwd($alternativePassword); $ENV{FTP_PASSWORD} = $password;