DO NOT REPLY [Bug 4220] New: --backup causes "stat" failed message when trying to delete a directory

samba-bugs at samba.org samba-bugs at samba.org
Sun Nov 12 07:52:57 GMT 2006


https://bugzilla.samba.org/show_bug.cgi?id=4220

           Summary: --backup causes "stat" failed message when trying to
                    delete a directory
           Product: rsync
           Version: 2.6.0
          Platform: x86
        OS/Version: Mac OS X
            Status: NEW
          Severity: critical
          Priority: P3
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: eric at shapiro.org
         QAContact: rsync-qa at samba.org


I am experimenting with the examples on this page:

http://rsync.samba.org/examples.html

Specifically, the backup to a central backup server with 7 day incremental.

I am manually running rsync (i.e. not using the script as it is presented) so
that I can experiment with its functionaility before putting it in place.  The
command I am using is:

rsync -av --force --ignore-errors --delete --backup
--backup-dir=/Users/eric/Desktop/rsyncBackup1 /Users/eric/Desktop/rsyncSource/
/Users/eric/Desktop/rsyncDest/

When the source directory (/Users/eric/Desktop/rsyncSource/) contains the
following:
  testfile1.txt
  testfolder
    testfile2.txt

The first time I run the command, it syncs correctly to
/Users/eric/Desktop/rsyncDest/, as expected.

Now, if I delete all the files from the source, and run the command again, I
get the following output:

.......
building file list ... done
backup_dir is /Users/eric/Desktop/rsyncBackup1
stat "/Users/eric/Desktop/rsyncBackup1/testfolder/testfile2.txt" failed: No
such file or directory
deleting testfolder/testfile2.txt
deleting testfolder
deleting testfile1.txt
./

wrote 6285 bytes  read 40 bytes  4216.67 bytes/sec
total size is 6148  speedup is 0.97
rsync error: some files could not be transferred (code 23) at main.c(639)

.......

The sync has failed.  My destination still contains "testfolder" and the file
inside "testfile2.txt"

If I follow the rsync example and use this script to backup, the following day,
I get the same error. And the following day, the same error.

Strangely though, if I run the script TWICE in a row, here's the output the
second time:

..........
building file list ... done
backup_dir is /Users/eric/Desktop/rsyncBackup2
deleting testfolder/testfile2.txt
deleting testfolder
./

wrote 6285 bytes  read 40 bytes  12650.00 bytes/sec
total size is 6148  speedup is 0.97

..........

So, it looks like it is failing the first time rsync is running and trying to
copy the file to be deleted to the backup folder.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list