Discussion:
[Fab-user] bug in Fabric get() when folder contains 2 levels of subfolders ?
Jan Van Opstal
2014-08-28 11:34:23 UTC
Permalink
Hi fabric users,

I am fairly new to fabric, so I hope my question is justified ;).
Here it comes: I want to use the get command in order to pull a folder and
all files/subfolders from a linux machine to my Win 7 PC with fabric. Each
subfolder on its own can also contain subfolders and so on.

Eg:

main_folder
file1
file2
subfolder1
file3
file4
subfolder2
file5
subfolder3
file6

What I see, is that the get command fails as soon as it sees the *subfolder2
*?
Fabric does not really give me a good reason, but I have a feeling that the
get does not really work as recursive as I expected it to be :(.
Here is an example when the get fails:

local path: backups/E1/E1_UPC_CH
remote path: /opstalj/backup/config_backup_2014-08-27_09-18/

[***@10.199.1.101:22] download:
C:\scripts\fab\backups\E1\E1_UPC_CH\config_backup_2014-08-27_09-18\subfolder1\file1.conf
<- /opstalj/backup/config_backup_2014-08-27_09-18/subfolder1/file1.conf
[***@10.199.1.101:22] download:
C:\scripts\fab\backups\E1\E1_UPC_CH\config_backup_2014-08-27_09-18\subfolder1\file2.conf
<- /opstalj/backup/config_backup_2014-08-27_09-18/subfolder1/file2.conf
[***@10.199.1.101:22] download:
C:\scripts\fab\backups\E1\E1_UPC_CH\config_backup_2014-08-27_09-18\subfolder1\subfolder2
<- /opstalj/backup/config_backup_2014-08-27_09-18/subfolder1/subfolder2

Fatal error: get() encountered an exception while downloading
'/opstalj/backup/config_backup_2014-08-27_09-18/'

Underlying exception:
Failure

As you can see, the get() resulted in the creation of:

- the main folder: config_backup_2014-08-27_09-18
- subfolder1

but aborted when it reached subfolder2 :( ...

I am using the following fabric version:

Fabric 1.9.1
Paramiko 1.14.0

Is it a bug ? Any workaround possible ? Or am I overlooking something ?
Thanks in advance,

Jan

Loading...