/[smeserver]/rpms/e-smith-backup/sme10/e-smith-backup-2.6.0.Do_Tar_Exclusion_In_the_console.patch
ViewVC logotype

Annotation of /rpms/e-smith-backup/sme10/e-smith-backup-2.6.0.Do_Tar_Exclusion_In_the_console.patch

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


Revision 1.1 - (hide annotations) (download)
Sun Jul 31 07:26:33 2016 UTC (8 years, 3 months ago) by stephdl
Branch: MAIN
CVS Tags: e-smith-backup-2_6_0-24_el7_sme, e-smith-backup-2_6_0-19_el7_sme, e-smith-backup-2_6_0-17_el7_sme, e-smith-backup-2_6_0-30_el7_sme, e-smith-backup-2_6_0-29_el7_sme, e-smith-backup-2_6_0-9_el7_sme, e-smith-backup-2_6_0-4_el7_sme, e-smith-backup-2_6_0-15_el7_sme, e-smith-backup-2_6_0-18_el7_sme, e-smith-backup-2_6_0-16_el7_sme, e-smith-backup-2_6_0-11_el7_sme, e-smith-backup-2_6_0-14_el7_sme, e-smith-backup-2_6_0-5_el7_sme, e-smith-backup-2_6_0-8_el7_sme, e-smith-backup-2_6_0-20_el7_sme, e-smith-backup-2_6_0-23_el7_sme, e-smith-backup-2_6_0-10_el7_sme, e-smith-backup-2_6_0-21_el7_sme, e-smith-backup-2_6_0-13_el7_sme, e-smith-backup-2_6_0-28_el7_sme, e-smith-backup-2_6_0-12_el7_sme, e-smith-backup-2_6_0-22_el7_sme, e-smith-backup-2_6_0-27_el7_sme, e-smith-backup-2_6_0-25_el7_sme, e-smith-backup-2_6_0-6_el7_sme, e-smith-backup-2_6_0-7_el7_sme, e-smith-backup-2_6_0-26_el7_sme, HEAD
* Sun Jul 31 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-4.sme
- Add or remove path in your backup by a file *.include and *.exclude
- Added e-smith-backup-2.6.0.Add_Or_Remove_Path_In_Backup.patch [SME: 9607]

1 stephdl 1.1 diff -Nur e-smith-backup-2.6.0.old/root/usr/share/perl5/vendor_perl/esmith/console/perform_backup.pm e-smith-backup-2.6.0.new/root/usr/share/perl5/vendor_perl/esmith/console/perform_backup.pm
2     --- e-smith-backup-2.6.0.old/root/usr/share/perl5/vendor_perl/esmith/console/perform_backup.pm 2016-02-05 00:08:22.000000000 +0100
3     +++ e-smith-backup-2.6.0.new/root/usr/share/perl5/vendor_perl/esmith/console/perform_backup.pm 2016-07-26 11:05:45.178100028 +0200
4     @@ -42,6 +42,7 @@
5     return sub {
6     my $fh = shift;
7     my @backup_list = esmith::Backup->restore_list;
8     + my @backup_excludes = esmith::Backup->excludes;
9    
10     unless (open(DU, "-|"))
11     {
12     @@ -100,8 +101,12 @@
13     close GZIP;
14     close $fh;
15     chdir "/";
16     - exec qw(tar cf -), grep { -e $_ } @backup_list;
17     - }
18     + #Create the archive
19     + my @directories = grep { -e $_ } @backup_list;
20     + my @exclude = map ("--exclude=$_",@backup_excludes);
21     + exec ("/bin/tar cf - @directories @exclude");
22     + }
23     +
24     waitpid($tar, 0);
25     warn "status from tar was $?\n" if $?;
26     unless (close PV)
27     @@ -127,6 +132,7 @@
28     {
29     my ($self, $console, $db) = @_;
30     my @backup_list = esmith::Backup->restore_list;
31     + my @backup_excludes = esmith::Backup->excludes;
32    
33     $ENV{PATH} = "/bin:/usr/bin";
34     $ENV{HOME} = "/root";
35     @@ -140,6 +146,19 @@
36     gettext("Do you wish to create backup on removable media?"),
37     );
38     return unless $rc == 0;
39     +
40     + if (@backup_excludes) {
41     + my $backupexclude = join ("\n/", sort @backup_excludes);
42     + ($rc, $choice) = $console->yesno_page
43     + (
44     + title => gettext("Some parts are excluded of your backup"),
45     + left => gettext("Next"),
46     + right => gettext("Cancel"),
47     + text => '/' . $backupexclude,
48     + );
49     + return unless $rc == 0;
50     + }
51     +
52     INITIATE_BACKUP:
53     ($rc, $choice) = $console->yesno_page
54     (

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