apache7@gmx.net
2005-May-13 14:36 UTC
rsync: mkstemp failed: No such file or directory (2)
Hello everyone, Server1: Harmony Server2: Peace I've been using rsync 2.6.4 since some time now, without any problem. I "copy" files from Server2 to Server1 (making Server1 a mirror of Server2). The command line used on Server1 was: rsync -vrlpogt --delete-after Server2::Img/ /LocalImg I was copying files from Server2 (module Img) to Server1 (in /LocalImg). We had a problem with Server2, so I had to format the partition. Now, I'm trying to copy back the files to Server2 from Server1. I tried the following command on Server1: rsync -vrlpogt --delete-after /LocalImg/ Server2::Img The directories were created on Server2, but no files were copied! I got the following error message repeating for each file it failed to copy: rsync: mkstemp "/tmp/.008902000072_0181.PNG.KnfE9V" (in Img) failed: No such file or directory (2) I tried rsync 2.6.5pre1 but got the same problem. By the way, I have rsync running as daemon (as root) on Server2. The config is: uid = root gid = root log file = /var/log/rsyncd.log [Img] path = /Img list = yes read only = no Can anyone help me to solve this problem? Thanks for any help.
On Fri, 13 May 2005, <apache7@gmx.net> wrote:> Hello everyone, > > Server1: Harmony > Server2: PeaceI have no idea what those are... What O/S are you using?> I tried the following command on Server1: > rsync -vrlpogt --delete-after /LocalImg/ Server2::Img > > The directories were created on Server2, but no files were copied! > I got the following error message repeating for each file it failed to copy: > rsync: mkstemp "/tmp/.008902000072_0181.PNG.KnfE9V" (in Img) failed: No such > file or directory (2) > > I tried rsync 2.6.5pre1 but got the same problem.Rsync does not use /tmp for incoming files unless it's specifically told to do so. By default, it creates the temporary file in the destination directory. So mkstemp apparently is being emulated by some other function that unconditionally uses /tmp. Not a good thing... The cause for the error is that you are sending to a daemon, and the default for a daemon is chroot = yes which means that there is no /tmp directory accessible by rsync after the chroot is done. Workaround is to use chroot = no in rsyncd.conf. To be safe, I'd suggest removing the --delete-after from your restore rsync since there shouldn't be anything to delete on a new partition. You should try to discover why mkstemp is using /tmp to solve it once and for all. -- John Van Essen Univ of Minn. Alumnus <vanes002@umn.edu>
apache7@gmx.net
2005-May-16 05:12 UTC
rsync: mkstemp failed: No such file or directory (2)
You are both right. Actually, I omitted the "--temp-dir=/tmp" parameter in the command line in my mail, because I thought rsync was creating the file locally first and then transferring it (which is wrong). I'll try it later today (without "--temp-dir=/tmp") and inform you about the results. Thanks for your help -------------- next part -------------- HTML attachment scrubbed and removed