"Invalid argument" error when moving sockets to backup dir
Jordan Russell
jr-list-2008 at quo.to
Thu May 22 21:41:20 GMT 2008
Jordan Russell wrote:
> Under 3.0.x, rsync sometimes prints an "Invalid argument" error when
> moving sockets to the backup directory (--backup-dir):
Steps to reproduce (on Fedora 9, with rsync 3.0.2 or 3.0.3pre2):
1. Create a subdirectory named "src" with 13 zero-byte files and a socket:
total 8
drwxr-xr-x 2 root root 4096 May 22 16:11 .
drwxr-xr-x 3 root root 4096 May 22 16:11 ..
-rw-r--r-- 1 root root 0 May 22 15:50 file01
-rw-r--r-- 1 root root 0 May 22 15:50 file02
-rw-r--r-- 1 root root 0 May 22 15:51 file03
-rw-r--r-- 1 root root 0 May 22 15:51 file04
-rw-r--r-- 1 root root 0 May 22 15:52 file05
-rw-r--r-- 1 root root 0 May 22 15:52 file06
-rw-r--r-- 1 root root 0 May 22 15:53 file07
-rw-r--r-- 1 root root 0 May 22 15:53 file08
-rw-r--r-- 1 root root 0 May 22 15:53 file09
-rw-r--r-- 1 root root 0 May 22 15:53 file10
-rw-r--r-- 1 root root 0 May 22 15:54 file11
-rw-r--r-- 1 root root 0 May 22 15:54 file12
-rw-r--r-- 1 root root 0 May 22 15:58 file13
srwxr-xr-x 1 root root 0 May 20 10:19 socket
2. Initially copy "src" to "dest":
# rsync -avHx --delete --backup --backup-dir=../backupdir src/ dest
sending incremental file list
created directory dest
./
file01
file02
file03
file04
file05
file06
file07
file08
file09
file10
file11
file12
file13
socket
sent 725 bytes received 265 bytes 1980.00 bytes/sec
total size is 0 speedup is 0.00
3. Move "socket" out of "src":
# mv src/socket .
4. Run rsync again:
# rsync -avHx --delete --backup --backup-dir=../backupdir src/ dest
sending incremental file list
./
rsync: mknod "/_test/dest/../backupdir/socket" failed: Invalid argument (22)
rsync: stat "/_test/dest/../backupdir/socket" failed: No such file or
directory (2)
deleting socket
sent 187 bytes received 15 bytes 404.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at
main.c(1031) [sender=3.0.2]
--
Jordan Russell
More information about the rsync
mailing list