Capistrano 3.0 file transfer?

Capistrano seems to have an extensive file transfer package .

However, after rewriting it seems to be gone in version 3.0. Any idea if there is an alternative way to transfer files to / from servers?

+6
source share
3 answers

Download:

desc "download foobar.txt into local_dir/" task :foobar do download! "some_remote_path/foobar.txt", "local_dir/" end 

I know this works with Cap 3.2.1 since I am using it right now.

+7
source

I asked about this in IRC and found that there is a download function:

 on hosts do |host| upload! '/config/database.yml', '/opt/my_project/shared/database.yml' end 

https://github.com/leehambley/sshkit/blob/master/EXAMPLES.md However, I still have to find a way to download files from the server without using rsync or scp

+3
source

You can use rsync

 run_locally do execute"rsync -ah --progress source destination" end 
+1
source

Source: https://habr.com/ru/post/956355/


All Articles