summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorSebastien Dupont <sdupont@mandriva.com>2001-12-29 03:38:49 +0000
committerSebastien Dupont <sdupont@mandriva.com>2001-12-29 03:38:49 +0000
commita4db1fe9b329dc2424829da70f03c14adc25ec0e (patch)
tree967f6d8bc16f730fe28d9d93e8742738d64743c4 /perl-install
parent93cb13b0188d9b04546715c206847095555e687c (diff)
downloaddrakx-backup-do-not-use-a4db1fe9b329dc2424829da70f03c14adc25ec0e.tar
drakx-backup-do-not-use-a4db1fe9b329dc2424829da70f03c14adc25ec0e.tar.gz
drakx-backup-do-not-use-a4db1fe9b329dc2424829da70f03c14adc25ec0e.tar.bz2
drakx-backup-do-not-use-a4db1fe9b329dc2424829da70f03c14adc25ec0e.tar.xz
drakx-backup-do-not-use-a4db1fe9b329dc2424829da70f03c14adc25ec0e.zip
fix problem of incremental backups !!!
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/drakbackup19
1 files changed, 8 insertions, 11 deletions
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup
index 95127774c..41b7876dd 100755
--- a/perl-install/standalone/drakbackup
+++ b/perl-install/standalone/drakbackup
@@ -477,12 +477,14 @@ sub build_backup_files {
if (grep /^backup\_incr\_sys/, @dir_content) {
my @more_recent = grep /^backup\_incr\_sys/, sort @dir_content;
$more_recent = pop @more_recent;
- system("$tar_cmd_sys -f $save_path/backup_incr_sys$the_time.$tar_ext `find @sys_files -newer $save_path/$more_recent`");
+ my @files_list = system("find @sys_files -newer $save_path/$more_recent");
+ system("$tar_cmd_sys -f $save_path/backup_incr_sys$the_time.$tar_ext @files_list");
}
elsif (grep /^backup\_base\_sys/, @dir_content) {
my @more_recent = grep /^backup\_base\_sys/, sort @dir_content;
$more_recent = pop @more_recent;
- system("$tar_cmd_sys -f $save_path/backup_incr_sys$the_time.$tar_ext `find @sys_files -newer $save_path/$more_recent`");
+ my @files_list = system("find @sys_files -newer $save_path/$more_recent");
+ system("$tar_cmd_sys -f $save_path/backup_incr_sys$the_time.$tar_ext @files_list");
}
else {
system("$tar_cmd_sys -f $save_path/backup_base_sys$the_time.$tar_ext @sys_files");
@@ -510,29 +512,24 @@ sub build_backup_files {
if ($backup_user) {
foreach (@user_list) {
my $user = $_;
-# if (grep (/^backup\_base\_user\_$user\_/, @dir_content)) { $base_user_exist = 1; }
-# else { $base_user_exist = 0; }
$path_name = return_path($user);
if ($backup_user_versions) {
if (grep(/^backup\_incr\_user\_$user\_/, @dir_content)) {
my @more_recent = grep /^backup\_incr\_user\_$user\_/, sort @dir_content;
$more_recent = pop @more_recent;
-# my @system("find $path_name -cnewer $save_path/$more_recent");
- system("$tar_cmd_user -f $save_path/backup_incr_user_$user$the_time.$tar_ext `find $path_name -cnewer $save_path/$more_recent`");
+ my @files_list = system("find $path_name -cnewer $save_path/$more_recent");
+ system("$tar_cmd_user -f $save_path/backup_incr_user_$user$the_time.$tar_ext @files_list ");
}
elsif (grep /^backup\_base\_user\_$user\_/, @dir_content) {
my @more_recent = grep /^backup\_base\_user\_$user\_/, sort @dir_content;
$more_recent = pop @more_recent;
- print "backup_base_user and more_recent : $more_recent\n";
- print "$tar_cmd_user -f $save_path/backup_incr_user_$user$the_time.$tar_ext `find $path_name -newer $save_path/$more_recent`\n";
-system("$tar_cmd_user -f $save_path/backup_incr_user_$user$the_time.$tar_ext `find $path_name -cnewer $save_path/$more_recent`");
+ my @files_list = system("find $path_name -cnewer $save_path/$more_recent");
+ system("$tar_cmd_user -f $save_path/backup_incr_user_$user$the_time.$tar_ext @files_list ");
}
else {
- print "else\n";
system("$tar_cmd_user -f $save_path/backup_base_user_$user$the_time.$tar_ext $path_name");
}
} else {
- print "else else\n";
system("cd $save_path && rm -f backup_user_$_* backup_base_user_$_* backup_incr_user_$_*");
system("$tar_cmd_user -f $save_path/backup_user_$_$the_time.$tar_ext $path_name");
}