Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local.transfer filesToCopy path problem #151

Closed
zhujun24 opened this issue Nov 21, 2016 · 5 comments · May be fixed by ajesse11x/flightplan#8, ajesse11x/flightplan#9 or ajesse11x/flightplan#10
Closed
Labels

Comments

@zhujun24
Copy link

I wanna rsync one file to server, filesToCopy is ['../aaa.conf'] , when local.transfer(filesToCopy, remoteDir) ,they will be error failed: No such file or directory,because that rsync file path is current path connect filesToCopy,just like /code/project/test/../aaa.conf not /code/project/aaa.conf

@DuanPengfei
Copy link

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.

@pstadler
Copy link
Owner

pstadler commented Dec 1, 2016

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.

@pstadler pstadler closed this as completed Dec 1, 2016
@DuanPengfei
Copy link

By the way, why use the tmp file instead of direct upload origin file? What are the benefits of doing so?

@pstadler
Copy link
Owner

pstadler commented Dec 1, 2016

This is the only way to ensure compatibility with various operating systems and rsync versions. See here

@zhujun24
Copy link
Author

zhujun24 commented Dec 2, 2016

Copy file instead of origin file to transfer is hack, but it's the only way to resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants