ALT Linux Bugzilla
– Attachment 3302 Details for
Bug 18763
новая опция --rsync-exclude
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
новая опция rsync-exclude
rsync-exclude.diff (text/plain), 2.17 KB, created by
Michael A. Kangin
on 2009-02-06 19:06:13 MSK
(
hide
)
Description:
новая опция rsync-exclude
Filename:
MIME Type:
Creator:
Michael A. Kangin
Created:
2009-02-06 19:06:13 MSK
Size:
2.17 KB
patch
obsolete
>--- vzdump.orig 2009-02-06 18:46:13 +0300 >+++ /usr/bin/vzdump 2009-02-06 18:57:45 +0300 >@@ -38,6 +38,7 @@ > my $opt_all; > my $opt_exclude; > my $opt_exclude_path; >+my $opt_rsync_exclude; > my $opt_debug = 1; > my $opt_dumpdir; > my $opt_compress = 0; >@@ -59,6 +60,7 @@ > my @script_ext = qw (start stop mount umount); > > my @findexcl; >+my @rsyncexcl; > > sub find_add_exclude { > my ($excltype, $value) = @_; >@@ -300,6 +302,7 @@ > print STDERR "usage: $0 OPTIONS [--all | VPSID]\n\n"; > print STDERR "\t--exclude VPSID\t\texclude VPSID (assumes --all)\n"; > print STDERR "\t--exclude-path REGEX\texclude certain files/directories\n"; >+ print STDERR "\t--rsync-exclude PATTERN\texclude certain files/directories on rsync stage.\n"; > print STDERR "\t--compress\t\tcompress dump file (gzip)\n"; > print STDERR "\t--dumpdir DIR\t\tstore resulting files in DIR\n"; > print STDERR "\t--xdelta\t\tcreate differential backup using xdelta\n"; >@@ -347,6 +350,7 @@ > if (!GetOptions ('all' => \$opt_all, > 'exclude=s@' => \$opt_exclude, > 'exclude-path=s@' => \$opt_exclude_path, >+ 'rsync-exclude=s@' => \$opt_rsync_exclude, > 'compress' => \$opt_compress, > 'restore=s' => \$opt_restore, > 'mailto=s@' => \$opt_mailto, >@@ -395,8 +399,12 @@ > find_add_exclude ('-regex', $path); > } > } >- > >+if ($opt_rsync_exclude) { >+ foreach my $path (@$opt_rsync_exclude) { >+ push @rsyncexcl, "--exclude", "'$path'"; >+ } >+} > > sub check_bin { > my ($bin, $msg) = @_; >@@ -698,7 +706,8 @@ > > mkdir $tmpdir || die "unable to create tmpdir"; > >- my $synccmd = "$rsync -aH --delete $dir $tmpdir"; >+ my $exclude_args = join (' ', @rsyncexcl); >+ my $synccmd = "$rsync -aH --delete $exclude_args $dir $tmpdir"; > debugmsg ('info', "starting first sync $dir to $tmpdir", \*LOG); > run_command (\*LOG, $synccmd); > >@@ -838,6 +847,9 @@ > can use this option more than once to specify > multiple exclude paths > >+--rsync-exclude PATTERN exclude certain files/directories on rsync stage. >+ See man rsync for PATTERN syntax. >+ > --compress compress dump file (gzip) > > --dumpdir DIR store resulting files in DIR
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18763
: 3302