My Rsync script is broken! Pls Help.

likuidsilence likuid.silence at gmail.com
Wed Dec 3 03:49:37 GMT 2008


Yeah I'm pretty sure I'm using the right command and error message.. Anyhow,
I ran my rsync command with strace like you suggested:

sudo strace -f -o /home/user/rsync.strace sudo rsync -rltODv --delete
/home/user/NTFS/Win-Ubuntu/ /media/BackupDrive/ --modify-window=2

and it gave me these errors again! :-(

rsync: failed to set times on "/media/BackupDrive/.": Not a directory (20)
rsync: failed to set times on "/media/BackupDrive/DataRecovery": Not a
directory (20)
rsync: failed to set times on "/media/BackupDrive/DataRecovery/Business
Cards": Not a directory (20)
rsync: failed to set times on "/media/BackupDrive/Downloads": Not a
directory (20)

and this is the output of my strace (not complete, since is a very huge
list, but posted what I think is necessary enough =P ):

6902  execve("/usr/bin/sudo", ["sudo", "rsync", "-rlptDv",
"/home/user/NTFS/Win-Ubuntu/", "/media/BackupDrive/", "--modify-window=2"],
[/* 16 vars */]) = 0
6902  brk(0)                            = 0x8a9d000
6902  access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
6902  mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb8098000
6902  access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
6902  open("/etc/ld.so.cache", O_RDONLY) = 3
6902  fstat64(3, {st_mode=S_IFREG|0644, st_size=56103, ...}) = 0
6902  mmap2(NULL, 56103, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb808a000
6902  close(3)                          = 0
6902  access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
6902  open("/lib/libpam.so.0", O_RDONLY) = 3
6902  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\31"...,
512) = 512
6902  fstat64(3, {st_mode=S_IFREG|0644, st_size=42476, ...}) = 0
6902  mmap2(NULL, 45260, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb807e000
6902  mmap2(0xb8088000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9) = 0xb8088000
6902  close(3)                          = 0
6902  access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
6902  open("/lib/tls/i686/cmov/libdl.so.2", O_RDONLY) = 3
6902  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \n\0\000"...,
512) = 512
6902  fstat64(3, {st_mode=S_IFREG|0644, st_size=9676, ...}) = 0
6902  mmap2(NULL, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb807a000
6902  mmap2(0xb807c000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb807c000
6902  close(3)                          = 0
6902  access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
6902  open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
6902  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340g\1"...,
512) = 512
6902  fstat64(3, {st_mode=S_IFREG|0755, st_size=1425800, ...}) = 0
6902  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb8079000
6902  mmap2(NULL, 1431152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xb7f1b000
6902  mmap2(0xb8073000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x158) = 0xb8073000
6902  mmap2(0xb8076000, 9840, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb8076000
6902  close(3)                          = 0
6902  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f1a000
6902  set_thread_area({entry_number:-1 -> 6, base_addr:0xb7f1a6b0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
6902  mprotect(0xb8073000, 8192, PROT_READ) = 0
6902  mprotect(0xb807c000, 4096, PROT_READ) = 0
6902  mprotect(0xb8088000, 4096, PROT_READ) = 0
6902  mprotect(0x8063000, 4096, PROT_READ) = 0
6902  mprotect(0xb80b5000, 4096, PROT_READ) = 0
6902  munmap(0xb808a000, 56103)         = 0
6902  geteuid32()                       = 0
6902  rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
6902  rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
6902  rt_sigaction(SIGTSTP, {SIG_IGN}, {SIG_DFL}, 8) = 0
6902  setrlimit(RLIMIT_NPROC, {rlim_cur=RLIM_INFINITY,
rlim_max=RLIM_INFINITY}) = 0
6902  fcntl64(0, F_GETFL)               = 0x2 (flags O_RDWR)
6902  fcntl64(1, F_GETFL)               = 0x8001 (flags
O_WRONLY|O_LARGEFILE)
6902  fcntl64(2, F_GETFL)               = 0x2 (flags O_RDWR)
6902  open("/proc/self/fd",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = 3
6902  fstat64(3, {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0
6902  fcntl64(3, F_GETFD)               = 0x1 (flags FD_CLOEXEC)
6902  brk(0)                            = 0x8a9d000
6902  brk(0x8abe000)                    = 0x8abe000
6902  getdents(3, /* 6 entries */, 1024) = 96
6902  getdents(3, /* 0 entries */, 1024) = 0
6902  close(3)                          = 0
6902  open("/etc/nsswitch.conf", O_RDONLY) = 3
6902  fstat64(3, {st_mode=S_IFREG|0644, st_size=513, ...}) = 0
6902  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb8097000
6902  read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 513
6902  read(3, "", 4096)                 = 0
6902  close(3)                          = 0
6902  munmap(0xb8097000, 4096)          = 0
6902  open("/etc/ld.so.cache", O_RDONLY) = 3
6902  fstat64(3, {st_mode=S_IFREG|0644, st_size=56103, ...}) = 0
6902  mmap2(NULL, 56103, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb808a000
6902  close(3)                          = 0
6902  access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
6902  open("/lib/tls/i686/cmov/libnss_compat.so.2", O_RDONLY) = 3
6902  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\16\0"...,
512) = 512
6902  fstat64(3, {st_mode=S_IFREG|0644, st_size=30436, ...}) = 0
6902  mmap2(NULL, 33356, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7f11000
6902  mmap2(0xb7f18000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7f18000
6902  close(3)                          = 0


However, when I run my rsync command with the -O option like this 
rsync -rltODv source destination, everything seems to work fine without any
errors :clap: but what gets me all puzzled is that why would it matter if 
-O, --omit-dir-times omit directories from --times (According to rsync man)
is included in the command??  There must be something I'm not seeing!!
:confused: any ideas ?? Thank you.


Bugzilla from matt at mattmccutchen.net wrote:
> 
> On Sat, 2008-11-29 at 13:54 -0800, likuidsilence wrote:
>> Here is my rsync command:
>> 
>> sudo rsync -rltODv --delete /home/user/NTFS/Win-Ubuntu
>> /home/user/BackupDrive --modify-window=2 > /home/user/rsync.last.log
>> 
>> 
>> and here is the output for "ls -la /home/user":
>> 
>> [...]
>> drwxr-xr-x  2 user user  4096 2008-11-27 23:39 BackupDrive
>> [...]
> 
> 
>> Bugzilla from matt at mattmccutchen.net wrote:
>> > 
>> > On Fri, 2008-11-28 at 20:37 -0800, likuidsilence wrote:
>> >> rsync: failed to set times on "/home/user/BackupDrive" : Not a
>> directory
>> >> (20)
> 
> I don't see how your command could result in the "Not a directory" error
> because /home/user/BackupDrive *is* a directory and, furthermore, the
> command shouldn't be processing the destination directory at all because
> your source, lacking a trailing slash, should go to
> /home/user/BackupDrive/Win-Ubuntu .
> 
> Are you sure you sent the right command and error message?  If so, or
> even if not, re-run rsync under strace so we can see how it is failing:
> 
> sudo strace -f -o /home/user/rsync.strace rsync -rltODv ...
> 
> Matt
> 
> -- 
> Please use reply-all for most replies to avoid omitting the mailing list.
> To unsubscribe or change options:
> https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
> 
> 

-- 
View this message in context: http://www.nabble.com/My-Rsync-script-is-broken%21-Pls-Help.-tp20743936p20806234.html
Sent from the Samba - rsync mailing list archive at Nabble.com.



More information about the rsync mailing list