search for: skip_file

Displaying 14 results from an estimated 14 matches for "skip_file".

2003 Mar 20
2
--link-dest uid/gid checking bug?
...n though --compare-dest with the same argument would work. It seemed like new files would be transferred even though files existed in the compare-dest/link-dest location; compare-dest would detect them but link-dest would make new files anyway. I tracked down my confusion to the new portion of skip_file() in generator.c. Because I wasn't supplying the --owner or --group options, the preserve_uid and preserve_gid flags were not set, and the source file's file->uid and file->gid values were just 0. But skip_file() was checking them against the destination file's st->st_uid and...
2003 Apr 08
1
link_dest checks perms despite no -p -o or -g
When using --link-dest, this block of code in skip_file causes new copies of files to be created if source and destination file permissions differ, even if -p -o and -g haven't been specified. if (link_dest) { if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { return 0; } if (st->st_uid != file->uid || st->s...
2005 Feb 27
1
Problem/fix combining -A and --link-dest
...operly considered when determining whether to link or copy a file. I built into my version a fix.??Has?this?already?been?fixed?in?2.6.3?or?the? upcoming .4, or is someone interested in what I did? What I did was pretty simple.??To?acls.c?I?added?a?function? test_if_acls_match().??I?then?modified?skip_file()?in?generator.c?to?use? this, instead of stat()'s modes, if both link_dest and preserve_acls are set.?? This solves both of the above problems.??The?differences?in?stat()'s?return? of modes between Linux and Solaris is avoided because skip_file() isn't looking at the modes of the ol...
2005 Apr 04
0
Problem/fix combining -A and --link-dest
...operly considered when determining whether to link or copy a file. I built into my version a fix. Has this already been fixed in 2.6.3 or the upcoming .4, or is someone interested in what I did? What I did was pretty simple. To acls.c I added a function test_if_acls_match(). I then modified skip_file() in generator.c to use this, instead of stat()'s modes, if both link_dest and preserve_acls are set. This solves both of the above problems. The differences in stat()'s return of modes between Linux and Solaris is avoided because skip_file() isn't looking at the modes of the ol...
2003 Mar 15
1
Dirvish, --link-dest and permissions
(I'm not sending this to dirvish@pegasus because I think that this message applies more to rsync's --link-dest option than to just dirvish.) I recently noticed a huge spike in dirvish network usage and traced it to files whose permissions had been changed. (with rsync v2.5.6) I understand and agree that a --link-dest copy of a source file cannot be hardlinked to, but couldn't a
1999 Oct 05
0
smbclient tar restore problem (linkflag) from tape-drive
..." the current linkflag values that are currently handled are: '0', '5', and 'L'. If the linkflag is any other value (eg NULL) the file is skipped. I have exprimented with substituting the code for linkflag case '0' for the default case and removing the "skip_file" - the restore then works, but as I do not know the details of what the tar linkflag is, I am unsure how safe this is to do. Any hints or comments gratefully accepted. Peter The relevant debug messages, and code follow: ----------------------------------------------- (1) DEBUG MESS...
2004 Mar 05
2
Problem with --link-dest when syncing AIX to Linux
...test1 actisi:remotetest/ test2/ receiving file list ... done ./ file1 file2 wrote 68 bytes read 189 bytes 102.80 bytes/sec total size is 14 speedup is 0.05 =====> Oooops. Why were file1 and file2 transferred? I did some debugging and found out that the problem seems to be in the function skip_file() in generator.c: if (link_dest) { extern int preserve_perms; extern int preserve_uid; extern int preserve_gid; if(preserve_perms && (st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) return 0; This is always true when rsyncing AIX -...
2002 Oct 24
2
Feature Request: break hardlinks before metadata changes
[This email is either empty or too large to be displayed at this time]
2005 Jan 05
1
rsync filename heuristics
...+ rsync-2.5.4-fuzzy/generator.c 2002-04-03 17:00:06.000000000 +1000 > @@ -42,11 +42,12 @@ > extern int always_checksum; > extern int modify_window; > extern char *compare_dest; > +extern int fuzzy; > > > /* choose whether to skip a particular file */ > static int skip_file(char *fname, > - struct file_struct *file, STRUCT_STAT *st) > + struct file_struct *file, const STRUCT_STAT *st) > { > if (st->st_size != file->length) { > return 0; > @@ -185,7 +186,61 @@ > return s; > } > > +/* Returns -1 for can't op...
2008 Mar 06
1
rsync: always modify atime of all destination files
...ng cmdline parameters > > -- no debconf information > diff -u rsync-2.6.2.orig/generator.c rsync-2.6.2/generator.c > --- rsync-2.6.2.orig/generator.c Thu Apr 15 13:55:23 2004 > +++ rsync-2.6.2/generator.c Fri Jul 23 15:47:40 2004 > @@ -471,8 +471,10 @@ > } > > if (skip_file(fname, file, &st)) { > - if (fnamecmp == fname) > + if (fnamecmp == fname) { > set_perms(fname,file,&st,1); > + update_atime(fname); > + } > return; > } > > diff -u rsync-2.6.2.orig/proto.h rsync-2.6.2/proto.h > --- rsync-2.6.2.orig/proto.h Thu...
2004 May 10
2
read error produces null-byte-filled destination file
I've run into a bug in the IO handling when reading a file. Suppose I have a file that lives on an NFS filesystem. That filesystem is NOT being exported with auth=0 permissions. So, if I try to access a file as root, it successfully opens the file, but subsequent reads fail with EACCES. This produces a destination file full of null bytes. I noticed this with 2.5.7, but checked 2.6.2 as
2003 Sep 05
1
new option suggestion '--backup-only'
...quot;%s\n",fname); } } else { + if (backup_only) + return; set_perms(fname,file,&st,1); } return; @@ -454,6 +472,8 @@ } if (!S_ISREG(st.st_mode)) { + if (backup_only) + return; if (delete_file(fname) != 0) { return; } @@ -477,7 +497,7 @@ } if (skip_file(fname, file, &st)) { - if (fnamecmp == fname) + if ((fnamecmp == fname) && !backup_only) set_perms(fname,file,&st,1); return; } @@ -487,6 +507,11 @@ return; } + if (backup_only) { + make_backup(fname); + return; + } + if (disable_deltas_p()) { write_int(f_ou...
2003 Nov 17
0
[PATCH] --source-filter && --dest-filter for rsync 2.5.6
...200 +++ rsync-2.5.6-filtered/generator.c 2003-11-16 13:57:54.000000000 +0100 @@ -35,6 +35,7 @@ extern int block_size; extern int csum_length; extern int ignore_times; +extern int times_only; extern int size_only; extern int io_timeout; extern int remote_version; @@ -48,8 +49,10 @@ static int skip_file(char *fname, struct file_struct *file, STRUCT_STAT *st) { - if (st->st_size != file->length) { - return 0; + if (! times_only) { + if (st->st_size != file->length) { + return 0; + } } if (link_dest) { if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_I...
1999 Oct 05
0
SAMBA digest 2259
...ag > values that are currently handled are: '0', '5', and 'L'. > If the linkflag is any other value (eg NULL) the file is skipped. > > I have exprimented with substituting the code for linkflag case '0' > for the default case and removing the "skip_file" - the restore then > works, but as I do not know the details of what the tar linkflag is, > I am unsure how safe this is to do. > > Any hints or comments gratefully accepted. > > Peter > > > > > > > The relevant debug messages, and code follow:...