search for: link_dest

Displaying 20 results from an estimated 34 matches for "link_dest".

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->st_gid != file->gid) { return 0; } } I think the code should be this instead. if (link_dest) { if(preserve_perms && ((st->st_mod...
2004 Sep 06
2
problems with --link-dest
Hello, I'm trying to do backups with rsync through ssh. This is what I wrote yet: src="/vrmd/webserver/" today=`date +%F` #link_dest="root@vm2:/vrmd/admin/backup/web/2004-09-05" link_dest="../2004-09-05" dest="root@vm2:/vrmd/admin/backup/web/$today" rsync -av -e ssh --delete --link-dest=$link_dest $src $dest in 2004-09-05 (on the dest-server) is the directory with the backup from yesterday. Of cou...
2002 Aug 02
1
[patch] --link-dest
...==== RCS file: /cvsroot/rsync/generator.c,v retrieving revision 1.44 diff -u -r1.44 generator.c --- generator.c 31 Jul 2002 21:20:07 -0000 1.44 +++ generator.c 3 Aug 2002 00:08:47 -0000 @@ -41,6 +41,7 @@ extern int always_checksum; extern int modify_window; extern char *compare_dest; +extern int link_dest; /* choose whether to skip a particular file */ @@ -50,6 +51,15 @@ if (st->st_size != file->length) { return 0; } + if (link_dest) { + if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { + return 0; + } + if (st->st_uid != file->uid || st->st_gid...
2008 Mar 28
3
Major rsync issue - overwriting files!!!
...for instance) the script, in it's entirety is below. Please HELP!!!! #!/bin/bash export PATH=$PATH:/bin:/usr/bin:/usr/local/bin ### Properties ### LOG=/Library/Logs/rsyncREM.log SRVR_IP=*.*.*.* BAK_DIR=`date +%A` SRC_DIR=/Volumes/REM BAK_PATH="/Volumes/REM Backup/RsyncBackups/REM" LINK_DEST="/Volumes/REM Backup/RsyncBackups/REM/Daily/PreviousBackups1" EXCLUDES=/Library/Scripts/rsync/exclude.txt ### rsync options ### OPTS="-Eapztc --links --ignore-errors --exclude-from=$EXCLUDES --delete-excluded --link-dest=$LINK_DEST" ### Sanity Check ### echo >> $LOG ec...
2002 Mar 22
1
[PATCH] --link-dest option
...=== RCS file: /cvsroot/rsync/generator.c,v retrieving revision 1.37 diff -u -r1.37 generator.c --- generator.c 19 Mar 2002 20:16:42 -0000 1.37 +++ generator.c 21 Mar 2002 23:31:26 -0000 @@ -41,6 +41,7 @@ extern int always_checksum; extern int modify_window; extern char *compare_dest; +extern int link_dest; /* choose whether to skip a particular file */ @@ -50,6 +51,15 @@ if (st->st_size != file->length) { return 0; } + if (link_dest) { + if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { + return 0; + } + if (st->st_uid != file->uid || st->st_gid...
2003 Nov 05
1
--link-dest
...o use --link-dest for back ups. (I think... I didn't look at the large picture.) Joe *** generator.c Thu Aug 29 09:44:55 2002 --- ../generator.c Tue Nov 4 09:12:59 2003 *************** *** 42,47 **** --- 42,50 ---- extern int modify_window; extern char *compare_dest; extern int link_dest; + extern int preserve_perms; + extern int preserve_uid; + extern int preserve_gid; /* choose whether to skip a particular file */ *************** *** 51,63 **** if (st->st_size != file->length) { return 0; } ! if (link_dest) { ! i...
2004 Apr 15
0
Multiple compare-dest args
...pre-1/generator.c 2004-03-07 21:29:59.000000000 +0100 +++ rsync-2.6.1pre-1-vidar/generator.c 2004-04-15 11:23:17.000000000 +0200 @@ -41,7 +41,7 @@ extern int io_timeout; extern int protocol_version; extern int always_checksum; -extern char *compare_dest; +extern char *compare_dest[]; extern int link_dest; @@ -69,13 +69,13 @@ if (always_checksum && S_ISREG(st->st_mode)) { char sum[MD4_SUM_LENGTH]; char fnamecmpdest[MAXPATHLEN]; + int i = 0; - if (compare_dest != NULL) { - if (access(fname, 0) != 0) { - pathjoin(fnamecmpdest, sizeof fnamecmpdest, - compare_dest, f...
2002 Mar 08
1
[PATCH][RFC] space saving incrementals
...ync/generator.c,v retrieving revision 1.33 diff -u -r1.33 generator.c --- generator.c 7 Feb 2002 16:36:12 -0000 1.33 +++ generator.c 7 Mar 2002 20:56:02 -0000 @@ -42,6 +42,8 @@ extern int always_checksum; extern int modify_window; extern char *compare_dest; +extern int compare_perms; +extern int link_dest; /* choose whether to skip a particular file */ @@ -51,6 +53,15 @@ if (st->st_size != file->length) { return 0; } + if (compare_perms) { + if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { + return 0; + } + if (st->st_uid != file->uid || st->st...
2014 Feb 15
2
rsync filter rules ignored by rsnapshot
...nc /usr/bin/rsync cmd_ssh /usr/bin/ssh cmd_logger /usr/bin/logger retain daily 7 retain weekly 4 retain monthly 3 verbose 5 loglevel 5 logfile /var/log/rsnapshot.log lockfile /var/run/rsnapshot.pid rsync_long_args -ev --rsync-path=/home/backupuser/rsync-wrapper.sh exclude "**no-backup**" link_dest 0 rsync_numtries 1 backup backupuser at debx40:/home/lorenz/ home/lorenz/ backup backupuser at debx40:/etc/ etc/ backup backupuser at debx40:/root/ root/ rsnapshot -D -c /etc/rsnapshot-debx40.conf daily works but e.g. /home/lorenz/testsource/no-backup/some-file is also rsynced, despite it woul...
2003 Apr 26
1
when does --link-dest create a link?
Hello, (I found a post in the archives titled "link_dest checks perms despite no -p -o or -g" on April 7th, which might be related - not sure...) I'm trying to get a rotating daily backup going with previous days kept as hard links to save on network transfer and disk space. The plan: on day N, rsync to blah/N/, using --link-dest=../<N-1...
2008 Aug 04
4
DO NOT REPLY [Bug 5665] New: need option to hard link from source tree to dest tree
https://bugzilla.samba.org/show_bug.cgi?id=5665 Summary: need option to hard link from source tree to dest tree Product: rsync Version: 3.0.4 Platform: All OS/Version: All Status: NEW Severity: major Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: Dave@Yost.com
2004 Mar 05
2
Problem with --link-dest when syncing AIX to Linux
...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 -> linux, look at this gdb outp...
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]
2012 Mar 25
1
link(2) EMLINK error behavior with --link-dest and --hard-links
...ad code really does.) Glancing over the code, it seems to me the way to do this is to have the hard_link_one() return value indicate when failure is EMLINK. This can then be tested for during the execution of finish_hard_link(). When link exhaustion is detected in finish_hard_link(), && link_dest, then report an error but also copy the source file and re-run finish_hard_link() to undo/fix-up the hard links already created. This assumes that the hard links created so far can be overwritten and won't break things. (And there needs to be some sort of flag to avoid an infinite loop should...
2003 Oct 18
0
Added functionality --compare-file and --compare-auto
...am is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,6 +42,8 @@ extern int always_checksum; extern int modify_window; extern char *compare_dest; +extern char *compare_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) &&...
2003 Sep 05
1
new option suggestion '--backup-only'
...name); kept = 1; } #endif diff -ur rsync/generator.c rsync-backuponly/generator.c --- rsync/generator.c 2003-08-22 14:42:13.000000000 +0900 +++ rsync-backuponly/generator.c 2003-09-02 15:44:26.000000000 +0900 @@ -41,6 +41,7 @@ extern int modify_window; extern char *compare_dest; extern int link_dest; +extern int backup_only; /* choose whether to skip a particular file */ @@ -295,6 +296,9 @@ return; } + if (backup_only && statret == -1 && errno == ENOENT) + return; + if (statret == 0 && !preserve_perms && (S_ISDIR(st.st_mode) == S_ISDIR...
2005 Feb 27
1
Problem/fix combining -A and --link-dest
...o 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 old and new files; it's looking at the ACLs.?? And because it is looking at th...
2005 Apr 04
0
Problem/fix combining -A and --link-dest
...o 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 old and new files; it's looking at the ACLs. And because it is looking at th...
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
2004 Mar 17
1
setgid on directories
...te call. If there's any interest in adding this to rsync, I can try to figure out how to pass the option. --- generator.c Tue Dec 23 20:14:16 2003 +++ ../rsync-2.6.0.gsa/generator.c Thu Feb 12 12:16:11 2004 @@ -41,6 +41,7 @@ extern int modify_window; extern char *compare_dest; extern int link_dest; +extern int setgid_dirs; /* choose whether to skip a particular file */ @@ -557,6 +558,11 @@ them. This is then fixed after the files are transferred */ if (!am_root && S_ISDIR(file->mode)) { file->mode |= S_IWUSR; /* user write */ + +...