diff options
author | Sebastien Dupont <sdupont@mandriva.com> | 2001-12-01 03:41:25 +0000 |
---|---|---|
committer | Sebastien Dupont <sdupont@mandriva.com> | 2001-12-01 03:41:25 +0000 |
commit | a5f4e1a8235ec2efe5bb307a5a5bc38776b22f8d (patch) | |
tree | fdc1d7802e29346a4573ff7d0d593e1a39370c32 /perl-install/standalone | |
parent | 122f5e069e484253e6567c11b52f619d97e0b2e5 (diff) | |
download | drakx-a5f4e1a8235ec2efe5bb307a5a5bc38776b22f8d.tar drakx-a5f4e1a8235ec2efe5bb307a5a5bc38776b22f8d.tar.gz drakx-a5f4e1a8235ec2efe5bb307a5a5bc38776b22f8d.tar.bz2 drakx-a5f4e1a8235ec2efe5bb307a5a5bc38776b22f8d.tar.xz drakx-a5f4e1a8235ec2efe5bb307a5a5bc38776b22f8d.zip |
do not include browser cache.
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/drakbackup | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index 1edbd6818..91780fcfd 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -266,13 +266,31 @@ sub status_report { } + +sub return_path { + my $name = $_; + foreach (@user_and_path_list) { + if (grep /^$name\:/, $_) { + s/^$name\://gi; + return $_; + } + } +} + sub build_backup_files { + -d $save_path or mkdir_p($save_path); + my $path_name; if ($where_hd) { + print "backup_sys @sys_files\n"; $backup_sys and system("tar cvfz $save_path/backup_sys.tar.gz @sys_files"); + print "backup_other @list_other\n"; @list_other and system("tar cvfz $save_path/backup_other.tar.gz @list_other"); if ($backup_user) { foreach (@user_list) { - system("tar cvfz $save_path/backup_user_$_.tar.gz /home/$_"); + $path_name = return_path($_); + print "path of user: $path_name\n"; + $what_no_browser or system("tar cvfz $save_path/backup_user_$_.tar.gz $path_name"); + $what_no_browser and system("tar cvz --exclude NewCache --exclude Cache --exclude cache -f $save_path/backup_user_$_.tar.gz $path_name | grep cahe"); } } } |