search for: preserve_hard_links

Displaying 20 results from an estimated 46 matches for "preserve_hard_links".

2004 Feb 10
3
rsync 2.6.1cvs dumps core when preserve_hard_links and backup
I tried rsync 2.6.1cvs on my FreeBSD 4.X boxes. It dumps core when preserve_hard_links and backup. And SUPPORT_HARD_LINKS is true. rsync -avH --delete --backup --backup-dir=/some/backup/dir \ srchost::dir/ dir/ The core says... ------------------------------------------------------------------------ Program terminated with signal 11, Segmentation fault. #0 0x80536c0 in keep_...
2004 Jan 25
2
scan for first existing hard-link file
...@ extern int backup_suffix_len; extern int backup_dir_len; extern char *backup_suffix; extern char *backup_dir; +extern struct file_struct **hlink_list; extern int am_root; extern int preserve_devices; @@ -263,7 +264,7 @@ static int keep_backup(char *fname) } #endif if (!kept && preserve_hard_links && file->link_u.links - && file->F_HEAD != file) { + && hlink_list[file->F_INDEX] != file) { if (verbose > 1) rprintf(FINFO, "%s is a hard link\n", f_name(file)); } --- generator.c 22 Jan 2004 04:38:18 -0000 1.72 +++ generator.c 25 Jan...
2001 Sep 05
2
Feedback on 2.4.7pre1
FYI, We've been using the 2.4.7pre1 release for several days now, with nary a hang problem. We haven't seen the EOF bug at all, which was what we upgraded for. This is with transfers of as much as 50GB to set up an initial mirror. The only thing we did was set timeout=0 -- which I guess is unnecessary. The semantics of this flag are a bit unclear. We thought was 'time since
2009 Oct 15
1
PATCH: --write-devices to allow synchronising to a block device
...erator.c 2009-04-27 02:51:50.000000000 +1200 +++ rsync-3.0.6-writedev/generator.c 2009-10-15 20:54:07.000000000 +1300 @@ -39,6 +39,7 @@ extern int preserve_xattrs; extern int preserve_links; extern int preserve_devices; +extern int write_devices; extern int preserve_specials; extern int preserve_hard_links; extern int preserve_executability; @@ -1733,7 +1734,7 @@ fnamecmp = fname; fnamecmp_type = FNAMECMP_FNAME; - if (statret == 0 && !S_ISREG(sx.st.st_mode)) { + if (statret == 0 && !(S_ISREG(sx.st.st_mode) || (write_devices && IS_DEVICE(sx.st.st_m...
2004 Jan 24
2
[PATCH] --links-depth for rsync
...root/rsync/flist.c,v retrieving revision 1.169 diff -u -r1.169 flist.c --- flist.c 22 Jan 2004 18:39:32 -0000 1.169 +++ flist.c 24 Jan 2004 20:30:08 -0000 @@ -50,6 +50,7 @@ extern int one_file_system; extern int make_backups; extern int preserve_links; +extern int follow_links_depth; extern int preserve_hard_links; extern int preserve_perms; extern int preserve_devices; @@ -725,6 +726,65 @@ /* IRIX cc cares that the operands to the ternary have the same type. */ #define MALLOC(ap, i) (ap ? (void*) string_area_malloc(ap, i) : malloc(i)) +void make_file_stat(struct file_struct * file, STRUCT_STAT *st) +{...
2008 May 08
1
Patch to not modify files in place unless "--inplace" option specified
...ITEM_REPORT_CHANGE, 0, NULL); + ITEM_LOCAL_CHANGE|iflags, 0, NULL); } - if (code != FNONE && verbose) + if ((iflags & ITEM_REPORT_CHANGE) && code != FNONE && verbose) rprintf(code, "%s -> %s\n", fname, sl); #ifdef SUPPORT_HARD_LINKS if (preserve_hard_links && F_IS_HLINKED(file)) finish_hard_link(file, fname, ndx, NULL, itemizing, code, -1); #endif - /* This does not check remove_source_files == 1 - * because this is one of the items that the old - * --remove-sent-files option would remove. */ - if (remove_source_files) + /*...
2004 Jun 17
1
[PATCH] make write_batch local
...oid write_null_sum(int f_out, int i) { + write_int(f_out, i); + if (!dry_run) write_sum_head(f_out, NULL); + if (write_batch) { + write_batch_csum_info(&i, NULL); + } + } /** * Acts on file number @p i from @p flist, whose name is @p fname. *************** *** 453,460 **** if (preserve_hard_links && hard_link_check(file, HL_SKIP)) return; if (errno == ENOENT) { ! write_int(f_out,i); ! if (!dry_run) write_sum_head(f_out, NULL); } else if (verbose > 1) { rsyserr(FERROR, errno, "recv_generator: failed to open %s", --- 483,489 ---- if (pres...
2004 Jul 11
0
[PATCH] [TRIVIAL] whitespace + variable rename
...num()) != -1) { struct file_struct *file = flist->files[i]; recv_generator(local_name ? local_name : f_name_to(file, fbuf), ! file, i, f); } phase++; if (verbose > 2) rprintf(FINFO,"generate_files phase=%d\n",phase); ! write_int(f,-1); if (preserve_hard_links) do_hard_links(); --- 596,616 ---- if (verbose > 2) rprintf(FINFO,"generate_files phase=%d\n",phase); ! write_int(f_out,-1); /* files can cycle through the system more than once * to catch initial checksum errors */ while ((i = get_redo_num()) != -1) { s...
2010 Jun 15
3
about rsyncing of block devices
...-12-23 19:36:27.000000000 +0000 +++ rsync-3.0.7.new/generator.c 2010-06-15 11:08:41.919557425 +0100 @@ -39,6 +39,7 @@ extern int preserve_acls; extern int preserve_xattrs; extern int preserve_links; extern int preserve_devices; +extern int copy_devices; extern int preserve_specials; extern int preserve_hard_links; extern int preserve_executability; @@ -980,7 +981,7 @@ static int try_dests_reg(struct file_str do { pathjoin(cmpbuf, MAXPATHLEN, basis_dir[j], fname); - if (link_stat(cmpbuf, &sxp->st, 0) < 0 || !S_ISREG(sxp->st.st_mode)) + if (link_stat(cmpbuf, &sxp->st, 0) < 0 |...
2003 Sep 05
1
new option suggestion '--backup-only'
...0, POPT_ARG_STRING, &bind_address, 0, 0, 0 }, - {"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 }, + {"backup-dir", 0, POPT_ARG_STRING, &backup_dir, OPT_BACKUP_DIR, 0, 0 }, {"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links, 0, 0, 0 }, {"read-batch", 0, POPT_ARG_STRING, &batch_prefix, OPT_READ_BATCH, 0, 0 }, {"write-batch", 0, POPT_ARG_STRING, &batch_prefix, OPT_WRITE_BATCH, 0, 0 }, {"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 }, {&...
2003 Mar 20
2
--link-dest uid/gid checking bug?
...g 2003-03-19 15:07:29.592476000 -0500 +++ generator.c 2003-03-19 16:12:24.994685000 -0500 @@ -27,6 +27,8 @@ extern int dry_run; extern int relative_paths; extern int preserve_links; +extern int preserve_uid; +extern int preserve_gid; extern int am_root; extern int preserve_devices; extern int preserve_hard_links; @@ -55,7 +57,8 @@ if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { return 0; } - if (st->st_uid != file->uid || st->st_gid != file->gid) { + if ((preserve_uid && st->st_uid != file->uid) || + (preserve_gid && st->st_gid !=...
2002 May 04
1
A simpler move-files patch
...FILE, + OPT_NO_BLOCKING_IO, OPT_WHOLE_FILE, OPT_NO_WHOLE_FILE, OPT_MOVE_FILES, OPT_MODIFY_WINDOW, OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_IGNORE_EXISTING}; static struct poptOption long_options[] = { @@ -365,6 +367,7 @@ {"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links , 0, 0, 0 }, {"read-batch", 0, POPT_ARG_STRING, &batch_prefix, OPT_READ_BATCH, 0, 0 }, {"write-batch", 0, POPT_ARG_STRING, &batch_prefix, OPT_WRITE_BATCH, 0, 0 }, + {"move-files", 0, POPT_ARG_NONE, &move_files, 0, 0, 0 }, #ifde...
2009 Mar 11
0
Odd issue with locked directories and Mac OS X
...w seems to resolve it though. Any insight would be appreciated. Mike diff -Naur rsync-3.0.5_base/receiver.c rsync-3.0.5/receiver.c --- rsync-3.0.5_base/receiver.c 2008-11-15 16:49:28.000000000 -0600 +++ rsync-3.0.5/receiver.c 2009-03-10 22:18:20.000000000 -0500 @@ -39,6 +42,7 @@ extern int preserve_hard_links; extern int preserve_perms; extern int preserve_xattrs; +extern int force_change; extern int basis_dir_cnt; extern int make_backups; extern int cleanup_got_literal; @@ -153,6 +157,20 @@ } #endif +#ifdef SUPPORT_FORCE_CHANGE + if (fd == -1) { + stat_x sx; + if (do_stat(file->dir...
2008 Dec 05
0
rsync patch to allow content from one device file to be synced to another device file
...make diff -u -r rsync-HEAD-20081115-2333GMT/receiver.c rsync-HEAD-20081115-2333GMT-d2d/receiver.c --- rsync-HEAD-20081115-2333GMT/receiver.c 2008-11-15 17:50:40.000000000 -0500 +++ rsync-HEAD-20081115-2333GMT-d2d/receiver.c 2008-12-04 17:01:00.000000000 -0500 @@ -38,6 +38,7 @@ extern int preserve_hard_links; extern int preserve_perms; extern int preserve_xattrs; +extern int copy_devices; extern int basis_dir_cnt; extern int make_backups; extern int cleanup_got_literal; @@ -285,7 +286,7 @@ goto report_write_error; #ifdef HAVE_FTRUNCATE - if (inplace && fd != -1 +...
2002 Jun 21
1
small security-related rsync extension
...xt)" sed 's/^X//' << 'SHAR_EOF' > backup-priv-backups && X*** backup.c.t Sun May 6 23:59:37 2001 X--- backup.c Fri Jun 21 13:15:51 2002 X*************** X*** 29,34 **** X--- 29,56 ---- X extern int preserve_devices; X extern int preserve_links; X extern int preserve_hard_links; X+ extern int priv_backups; X+ X+ #ifdef HAVE_CHMOD X+ static int strip_perm(char *fname) X+ { X+ struct stat buf; X+ if (link_stat(fname,&buf) != 0) { X+ rprintf(FERROR,"stat failed\n"); X+ return 0; X+ } X+ X+ if (S_ISREG(buf.st_mode) && (buf.st_mode & (S_ISUI...
2008 Oct 09
1
DO NOT REPLY [Bug 5820] New: rsync does not replace symlink atomically
...ITEM_LOCAL_CHANGE|ITEM_REPORT_CHANGE, 0, NULL); + } + if (verbose) + rprintf(code, "%s -> %s\n", fname, sl); +#ifdef SUPPORT_HARD_LINKS + if (preserve_hard_links && F_IS_HLINKED(file)) + finish_hard_link(file, fname, ndx, NULL, itemizing, code, -1); +#endif + if (remove_source_files) + goto return_with_success; + go...
2008 Aug 20
0
Problem with exact moment of issuing transfer log entry for a [recv] action
...recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, fname, fd2, F_LENGTH(file)); - log_item(log_code, file, &initial_stats, iflags, NULL); - if (fd1 != -1) close(fd1); if (close(fd2) < 0) { @@ -719,6 +717,7 @@ if (remove_source_files || inc_recurse || (preserve_hard_links && F_IS_HLINKED(file))) send_msg_int(MSG_SUCCESS, ndx); + log_item(log_code, file, &initial_stats, iflags, NULL); break; case 0: { enum logcode msgtype = redoing ? FERROR_XFER : FWARNING;
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
2003 Nov 29
1
bogus hardlinks bug?
dear rsyncists, rsync is superb! but did i actually find a bug? i did: $ rsync -vRHSPa rsync://rsync.mirror.ac.uk/updates.redhat.com/7.3/en/os/SRPMS . into an empty local directory the result was 140 bogus hardlinks of the same file: -rw-rw-r-- 140 g g 6147582 2002/12/04 16:55:24 Canna-3.5b2-62.7.3.src.rpm -rw-rw-r-- 140 g g 6147582 2002/12/04 16:55:24
2006 Apr 26
2
--link-dest and file/dir transfer to remote rsync daemon
Hi NG, I want to do incremental backups to a remote server running rsyncd (because daemonless transfer via ssh often hangs!). In contrast to transfer via ssh (without remote rsyncd) this doesn't seem possible, or do I miss something? Imagine I want to incrementally backup `mydir' to the backup space `backup' on e remote server `alpha' running an rsync daemon. rsyncd on