search for: preserve_devices

Displaying 20 results from an estimated 24 matches for "preserve_devices".

2009 Oct 15
1
PATCH: --write-devices to allow synchronising to a block device
...p] diff -ru rsync-3.0.6/generator.c rsync-3.0.6-writedev/generator.c --- rsync-3.0.6/generator.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...
2010 Jun 15
3
about rsyncing of block devices
...ur rsync-3.0.7/generator.c rsync-3.0.7.new/generator.c --- rsync-3.0.7/generator.c 2009-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) &lt...
2003 Mar 20
2
--link-dest uid/gid checking bug?
...========== --- generator.c.orig 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...
2004 Jan 24
2
[PATCH] --links-depth for rsync
...9 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) +{ + file->modtime = st->st_mtime; + file->length =...
2002 Mar 12
2
Patch: --drop-suid Remove suid/sgid from target files
...uot;owner", 'o', POPT_ARG_NONE, &preserve_uid}, {"group", 'g', POPT_ARG_NONE, &preserve_gid}, + {"drop-suid", 0, POPT_ARG_NONE, &drop_suid}, {"devices", 'D', POPT_ARG_NONE, &preserve_devices}, {"times", 't', POPT_ARG_NONE, &preserve_times}, {"checksum", 'c', POPT_ARG_NONE, &always_checksum}, diff -r --unified rsync-2.5.4pre1-orig/rsync.yo rsync-2.5.4pre1/rsync.yo --- rsync-2.5.4pre1-orig/rsync.yo Thu Feb 7 08:20:49...
2004 May 06
2
rsync-2.6.2: NFS clients confused after an rsync
We use rsync to update an nfs server. After an update, we noticed that a large number of clients didn't see the updated data. It took me a while to be able to reliably reproduce this problem, but it happens on old and new versions of rysnc. It also happens across all the platforms we use here (sun/linux/netapp). This shows the problem: [Note my home directory is NFS mounted]
2004 Nov 13
1
Archive Delete Mode
...OPT_SENDER, 0, 0 }, {"recursive", 'r', POPT_ARG_NONE, &recurse, 0, 0, 0 }, @@ -699,7 +702,7 @@ return 0; } - if (archive_mode) { + if (archive_mode || archive_delete_mode) { if (!files_from) recurse = 1; #if SUPPORT_LINKS @@ -712,6 +715,9 @@ preserve_devices = 1; } + if (archive_delete_mode) + delete_mode = 1; + if (relative_paths < 0) relative_paths = files_from? 1 : 0;
2002 Jun 21
1
small security-related rsync extension
...============ echo "x - extracting backup-priv-backups (Text)" 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...
2005 May 31
0
[Bug 2758] New: "File exists" error using options -b and --backup-dir with device files.
...name) { - STRUCT_STAT st; + STRUCT_STAT st, bufst; struct file_struct *file; char *buf; int kept = 0; @@ -190,6 +190,12 @@ /* Check to see if this is a device file, or link */ if (IS_DEVICE(file->mode)) { if (am_root && preserve_devices) { + /* delete backup_dir destination device if it exists */ + if (do_stat(buf, &bufst) == 0 && IS_DEVICE(bufst.st_mode)) { + if (do_unlink(buf) < 0) + rsyserr(FERROR, errn...
2003 Oct 01
1
PATCH: option to ignore case in filenames
...archive mode, equivalent to -rlptgoD\n"); rprintf(F," -r, --recursive recurse into directories\n"); rprintf(F," -R, --relative use relative path names\n"); @@ -332,6 +334,7 @@ {"devices", 'D', POPT_ARG_NONE, &preserve_devices , 0, 0, 0 }, {"times", 't', POPT_ARG_NONE, &preserve_times , 0, 0, 0 }, {"checksum", 'c', POPT_ARG_NONE, &always_checksum , 0, 0, 0 }, + {"ignorecase", 0, POPT_ARG_NONE, &ignore_case, 0, 0, 0 }, {&quot...
2008 Feb 15
4
Revised flags patch
...func_$ac_func" | $as_tr_sh` diff -brpu rsync-3.0.0pre9/flist.c rsync-3.0.0pre9-flags/flist.c --- rsync-3.0.0pre9/flist.c Sun Feb 10 06:41:50 2008 +++ rsync-3.0.0pre9-flags/flist.c Fri Feb 15 19:33:09 2008 @@ -50,6 +50,7 @@ extern int preserve_links; extern int preserve_hard_links; extern int preserve_devices; extern int preserve_specials; +extern int fileflags_ndx; extern int uid_ndx; extern int gid_ndx; extern int eol_nulls; @@ -344,6 +345,9 @@ static void send_file_entry(int f, struc { static time_t modtime; static mode_t mode; +#ifdef SUPPORT_FLAGS + static uint32 fileflags; +#endif #ifdef...
2004 Feb 20
1
[patch] fix for "refuse options" ignored due to popt
...static struct poptOption long_options[] = { /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ @@ -336,7 +336,7 @@ {"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 }, {"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 }, {"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 }, - {"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 }, + {"checksum", 'c', POPT_ARG_NONE, &always_checksum, OPT_CHECKSU...
2008 May 08
1
Patch to not modify files in place unless "--inplace" option specified
...== 1 because this is one of the + * items that the old --remove-sent-files option would + * remove. */ + if ((iflags & ITEM_REPORT_CHANGE) ? remove_source_files + : remove_source_files == 1) goto return_with_success; } #endif @@ -1592,6 +1605,7 @@ if ((am_root && preserve_devices && IS_DEVICE(file->mode)) || (preserve_specials && IS_SPECIAL(file->mode))) { + int iflags = 0; uint32 *devp = F_RDEV_P(file); dev_t rdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp)); if (statret == 0) { @@ -1609,7 +1623,15 @@ && BITS_EQUAL(sx.st.st_mo...
2002 Mar 08
1
[PATCH][RFC] space saving incrementals
...compare-perms", 0, POPT_ARG_NONE, &compare_perms}, {"owner", 'o', POPT_ARG_NONE, &preserve_uid}, {"group", 'g', POPT_ARG_NONE, &preserve_gid}, {"devices", 'D', POPT_ARG_NONE, &preserve_devices}, @@ -320,6 +327,7 @@ {"timeout", 0, POPT_ARG_INT, &io_timeout}, {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir}, {"compare-dest", 0, POPT_ARG_STRING, &compare_dest}, + {"link-dest", 0, POPT_ARG_STRIN...
2004 Apr 08
4
Device majors incorrectly set to 0 during rsync
OK. Didn't see anything about this in the archives, other than an old post from 2000 about a similar problem, so here goes. Feel free to contact me if I can provide anything else useful. Problem: -------- Major numbers on 64bit Solaris are being dropped, and created as 0 on recieving end. 32bit version works perfectly. Environment: ------------ Solaris 8 or Solaris 9 (haven't tried
2002 Aug 05
5
[patch] read-devices
...if (only_existing && statret == -1 && errno == ENOENT) { /* we only want to update existing files */ if (verbose > 1) rprintf(FINFO, "not creating new file \"%s\"\n",fname); @@ -337,9 +339,9 @@ return; } #ifdef HAVE_MKNOD - if (am_root && preserve_devices && IS_DEVICE(file->mode)) { + if (!read_devices && am_root && preserve_devices && IS_DEVICE(file->mode)) { if (statret != 0 || st.st_mode != file->mode || st.st_rdev != file->rdev) { delete_file(fname); @@ -361,15 +363,23 @@ #endif...
2004 Jan 25
2
scan for first existing hard-link file
...------- --- backup.c 20 Jan 2004 05:24:07 -0000 1.19 +++ backup.c 25 Jan 2004 09:54:32 -0000 @@ -25,6 +25,7 @@ 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...
2003 Sep 05
1
new option suggestion '--backup-only'
...ckuponly/backup.c --- rsync/backup.c 2003-08-22 09:30:46.000000000 +0900 +++ rsync-backuponly/backup.c 2003-09-02 15:29:03.000000000 +0900 @@ -25,6 +25,7 @@ extern int backup_dir_len; extern char *backup_suffix; extern char *backup_dir; +extern int backup_only; extern int am_root; extern int preserve_devices; @@ -133,21 +134,26 @@ int keep_trying = 4; int keep_path_extfs = 0; int failed; + int saveerrno; while (keep_trying) { - if (keep_path_extfs) { + if (keep_path_extfs || backup_only) { failed = copy_file(src, dst, 0755); + saveerrno = errno; if (!failed) { do_unlink(src);...
2020 Feb 06
0
[PATCH] Add support for zstd compression
...23,12 @@ void server_options(char **args, int *argc_p) args[ac++] = arg; } + if (do_compression_zstd && def_compress_level != Z_DEFAULT_COMPRESSION) { + if (asprintf(&arg, "--compress-level=%d", def_compress_level) < 0) + goto oom; + args[ac++] = arg; + } + if (preserve_devices) { /* Note: sending "--devices" would not be backward-compatible. */ if (!preserve_specials) diff --git a/rsync.yo b/rsync.yo index 207d487eb11fb..0832a5b2b1b6d 100644 --- a/rsync.yo +++ b/rsync.yo @@ -427,6 +427,7 @@ to the detailed description below for a complete description. ve...
2003 Oct 18
0
Added functionality --compare-file and --compare-auto
...0 }, {"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 }, /* TODO: Should this take an optional int giving the compression level? */ {"compress", 'z', POPT_ARG_NONE, &do_compression , 0, 0, 0 }, @@ -567,6 +574,10 @@ preserve_devices=1; break; + case 'A': + compare_auto=1; + break; + case OPT_SENDER: if (!am_server) { usage(FERROR); @@ -615,6 +626,13 @@ } } + if ((compare_dest||compare_auto) && compare_file) { + snprintf(err_buf,sizeof(err_buf), + "--compare-file cannot be...