search for: fnamecmpbuf

Displaying 17 results from an estimated 17 matches for "fnamecmpbuf".

2004 Apr 15
0
Multiple compare-dest args
...= NULL) { + pathjoin(fnamecmpdest, sizeof fnamecmpdest, + compare_dest[i], fname); + fname = fnamecmpdest; + i++; } file_checksum(fname,sum,st->st_size); return memcmp(sum, file->u.sum, protocol_version < 21 ? 2 @@ -270,7 +270,7 @@ int statret; char *fnamecmp; char fnamecmpbuf[MAXPATHLEN]; - extern char *compare_dest; + extern char *compare_dest[]; extern int list_only; extern int only_existing; extern int orig_umask; @@ -408,11 +408,15 @@ fnamecmp = fname; - if (statret == -1 && compare_dest != NULL) { + if (statret == -1 && compare_dest[0] !...
2003 Oct 18
0
Added functionality --compare-file and --compare-auto
..._file; +extern int compare_auto; extern int link_dest; @@ -357,29 +360,36 @@ fnamecmp = fname; - if ((statret == -1) && (compare_dest != NULL)) { - /* try the file at compare_dest instead */ + if ((statret == -1) && compare_auto) { + compare_file = findcomparename(fname,fnamecmpbuf); + } else if ((statret == -1) && (compare_dest != NULL)) { + snprintf(fnamecmpbuf,MAXPATHLEN,"%s/%s", + compare_dest,fname); + compare_file = fnamecmpbuf; + } + + if ((statret == -1) && (compare_file != NULL)) { + /*try this file instead (--compare-dest, --compare-...
2002 Aug 02
1
[patch] --link-dest
...urn 0; + } + } + /* if always checksum is set then we use the checksum instead of the file time to determine whether to sync */ @@ -356,6 +366,18 @@ statret = -1; if (statret == -1) errno = saveerrno; +#if HAVE_LINK + else if (link_dest && !dry_run) { + if (do_link(fnamecmpbuf, fname) != 0) { + if (verbose > 0) + rprintf(FINFO,"link %s => %s : %s\n", + fnamecmpbuf, + fname, + strerror(errno)); + } + fnamecmp = fnamecmpbuf; + } +#endif else fnamecmp = fnamecmpbuf; } Index: options.c ======================================...
2005 Jan 05
1
rsync filename heuristics
...error(errno)); > + } > + > + return fd; > +} > > /* > * Acts on file number I from FLIST, whose name is fname. > @@ -203,9 +258,6 @@ > struct sum_struct *s; > int statret; > struct file_struct *file = flist->files[i]; > - char *fnamecmp; > - char fnamecmpbuf[MAXPATHLEN]; > - extern char *compare_dest; > extern int list_only; > extern int preserve_perms; > extern int only_existing; > @@ -341,82 +393,29 @@ > return; > } > > - fnamecmp = fname; > - > - if ((statret == -1) && (compare_dest != NULL)) { &...
2002 Mar 08
1
[PATCH][RFC] space saving incrementals
...file->gid) { + return 0; + } + } + /* if always checksum is set then we use the checksum instead of the file time to determine whether to sync */ @@ -352,6 +363,17 @@ statret = -1; if (statret == -1) errno = saveerrno; +#if HAVE_LINK + else if (link_dest) + if (do_link(fnamecmpbuf, fname) != 0) { + if (verbose > 0) + rprintf(FINFO,"link %s => %s : %s\n", + fnamecmpbuf, + fname, + strerror(errno)); + fnamecmp = fnamecmpbuf; + } +#endif else fnamecmp = fnamecmpbuf; } Index: options.c =================================================...
2002 Mar 22
1
[PATCH] --link-dest option
...file->gid) { + return 0; + } + } + /* if always checksum is set then we use the checksum instead of the file time to determine whether to sync */ @@ -382,6 +392,17 @@ statret = -1; if (statret == -1) errno = saveerrno; +#if HAVE_LINK + else if (link_dest) + if (do_link(fnamecmpbuf, fname) != 0) { + if (verbose > 0) + rprintf(FINFO,"link %s => %s : %s\n", + fnamecmpbuf, + fname, + strerror(errno)); + fnamecmp = fnamecmpbuf; + } +#endif else fnamecmp = fnamecmpbuf; } Index: options.c =================================================...
2006 Oct 21
1
Rsync 2.6.9pre2 tries to read ACLs of nonexistent files
...is zero if and only if the destination file actually exists. However, back in lines 1210-1226, the generator sets real_ret to 0 if a basis file is found, even though the destination file does not exist: if (statret != 0 && basis_dir[0] != NULL) { int j = try_dests_reg(file, fname, ndx, fnamecmpbuf, &sx, itemizing, maybe_ATTRS_REPORT, code); if (j == -2) { if (remove_source_files == 1) goto return_with_success; goto cleanup; } if (j >= 0) { fnamecmp = fnamecmpbuf; fnamecmp_type = j; statret = 0; } } real_ret = statret; real_sx = sx; A few lines...
2010 Apr 14
0
issues with batch mode for incremental backups
...fnamecmp_type); - exit_cleanup(RERR_PROTOCOL); + fnamecmp = fname; + break; } pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, basis_dir[fnamecmp_type], fname); My restore went 5 times faster, and I verified (with rsync!) that I ended up with the same tree. I didn't really know what I was doing, but am I on the right track? Can anyone think of where this...
2004 Sep 02
1
--partiall-dir not behaving like it ought too
Hi, I have awaited the new release inorder to use the -"-partial-dir" option. But after testing it seems that it does not behave like it says on the tin. It will correctly move and rename the interrupted file to the declared directory, but it will not attempt to use it when the client attempts to rsync the file again. I have a Solaris 8 box running as a server (Matthew), and another
2001 Nov 13
2
direct write patch
...*compare_dest; extern int make_backups; +extern int direct_write; extern char *backup_suffix; static struct delete_list { @@ -302,7 +303,8 @@ int fd1,fd2; STRUCT_STAT st; char *fname; - char fnametmp[MAXPATHLEN]; + char *fnametmp; + char fnametmpbuf[MAXPATHLEN]; char *fnamecmp; char fnamecmpbuf[MAXPATHLEN]; struct map_struct *buf; @@ -314,6 +316,7 @@ extern int preserve_perms; extern int delete_after; struct stats initial_stats; + int write_flags; if (verbose > 2) { rprintf(FINFO,"recv_files(%d) starting\n",flist->count); @@ -404,22 +407,29 @@ buf = NULL...
2005 Mar 31
2
Some files not logged when using --compare-dest. Bug?
Hi again. I just spotted another peculiarity when inspecting the rsync log. When using --compare-dest, source files that have permissions that differ from the "comparables" are not logged, unless you're using -i. Here's a testing session: $ ls -lR .: total 12 drwxr-xr-x 2 vidar users 4096 2005-03-31 14:16 cmp/ drwxr-xr-x 2 vidar users 4096 2005-03-31 14:23 dst/
2005 Apr 23
1
--link-dest / --hard-links problem
I've looked around for a bug report on this problem and haven't seen one, so I apologize if this has already been discussed. I have a homegrown script which uses rsync to maintain daily backups of roughly twenty Redhat Linux systems running RH 7.2, 7.3, AS 3, and AS 4. As there are files with multiple links on the source systems, it is necessary to call rsync using the -H (--hard-links)
2008 Mar 19
0
[PATCH] Unsnarl missing_below/dry_run logic.
...*skip_dir = NULL; static struct file_list *fuzzy_dirlist = NULL; static int need_fuzzy_dirlist = 0; struct file_struct *fuzzy_file = NULL; @@ -1241,7 +1252,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, char *fnamecmp, *partialptr, *backupptr = NULL; char fnamecmpbuf[MAXPATHLEN]; uchar fnamecmp_type; - int implied_dirs_are_missing = relative_paths && !implied_dirs && protocol_version < 30; int del_opts = delete_mode || force_delete ? DEL_RECURSE : 0; int is_dir = !S_ISDIR(file->mode) ? 0 : inc_recurse && ndx != cur_flis...
2018 May 18
9
[Bug 13445] New: Fuzzy searching in link-dest tries to open regular file as directory
https://bugzilla.samba.org/show_bug.cgi?id=13445 Bug ID: 13445 Summary: Fuzzy searching in link-dest tries to open regular file as directory Product: rsync Version: 3.1.3 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 Component: core
2006 Jan 24
1
propagate atimes with rsync-2.6.6 (fwd)
...= st.st_size; file->mode = st.st_mode; file->uid = st.st_uid; diff -uNr rsync-2.6.6/generator.c rsync-2.6.6_patch/generator.c --- rsync-2.6.6/generator.c 2005-07-28 21:06:03.000000000 +0200 +++ rsync-2.6.6_patch/generator.c 2005-11-25 11:33:33.000000000 +0100 @@ -917,6 +917,13 @@ fnamecmpbuf, 1, itemizing && verbose > 1, code) == 0) { + if (set_modtime(fname,file->modtime, + file->acctime) != 0) { + rsyserr(FERROR, errno, + "failed to set times on %s", + full_fname(fname)); + return; + } if (preserv...
2004 Jan 17
1
--delete-sent-files (AKA --move-files)
...ot_literal; +extern int delete_sent_files; static void delete_one(char *fn, int is_dir) { @@ -287,7 +288,7 @@ int recv_files(int f_in,struct file_list char *fname, fbuf[MAXPATHLEN]; char template[MAXPATHLEN]; char fnametmp[MAXPATHLEN]; - char *fnamecmp; + char *fnamecmp, numbuf[4]; char fnamecmpbuf[MAXPATHLEN]; struct map_struct *mapbuf; int i; @@ -461,16 +462,20 @@ int recv_files(int f_in,struct file_list cleanup_disable(); - if (!recv_ok) { + if (recv_ok) { + if (delete_sent_files) { + SIVAL(numbuf, 0, i); + send_msg(MSG_SUCCESS, numbuf, 4); + } + } else { if (cs...
2002 Aug 05
5
[patch] read-devices
...s is a FIFO or device, copying its content to a regular file.\n", f_name(file)); + errno = saveerrno; + } + } else { + rprintf(FINFO, "skipping non-regular file \"%s\"\n",fname); + return; + } } fnamecmp = fname; @@ -385,8 +395,9 @@ else fnamecmp = fnamecmpbuf; } + { int errsave=errno; rprintf(FINFO, "#ET# recv_generator: statret==%d, errno=%d\n", statret, errno); errno=errsave; } if (statret == -1) { if (errno == ENOENT) { write_int(f_out,i); if (!dry_run) send_sums(NULL,f_out); @@ -433,8 +444,9 @@ return; } if (disab...