Closed zhujun24 closed 7 years ago
I also with the same problem. local.transfer('../app/', REMOTE_PROJECT_CODE_PATH);
got error rsync: link_stat "/tt/deploy/app" failed: No such file or directory (2)
, the correct path should be /tt/app
not /tt/deploy/app
, the flightplan.js
in the /tt/deploy/
folder.
Hey there.
Unfortunately this is limitation of rsync. You could try to work with absolute paths or create a tar file (probably in /tmp), transfer this to the remote servers, untar it and continue from there. This has several advantages over copying a bunch of small files.
By the way, why use the tmp file instead of direct upload origin file? What are the benefits of doing so?
This is the only way to ensure compatibility with various operating systems and rsync versions. See here
Copy file instead of origin file to transfer is hack, but it's the only way to resolve it.
I wanna rsync one file to server,
filesToCopy
is['../aaa.conf']
, whenlocal.transfer(filesToCopy, remoteDir)
,they will be errorfailed: No such file or directory
,because that rsync file path is current path connectfilesToCopy
,just like/code/project/test/../aaa.conf
not/code/project/aaa.conf