2017-06-27 9 views
0

ファブリックでリモートディレクトリを再帰的にコピーする方法はありますか?私は現在、ファブリックを使用してローカル(「scp ...」)を使用してダウンロードしてダウンロードするディレクトリのリストを作成しています。 get()のドキュメントはスペアであり、単一のファイルにしか見えません。ファブリックでリモートディレクトリを再帰的にコピー

答えて

1

使用fabric.operations.get

from fabric.operations import get as download 
lcd('/path/to/local-directory-to-save-to') 
download('/path/to/remote_directory', '.')