Cyberduck Mountain Duck CLI

#10613 new enhancement

Erase and restore cursor position in output does not work

Reported by: MarkBlaise Owned by:
Priority: normal Milestone:
Component: cli Version: 6.9.0
Severity: normal Keywords:
Cc: emby@… Architecture: Intel
Platform: Windows 8.1

Description

I've been using the Duck CLI on Windows and whether I redirect output to a file or just let it write to the console window, Duck emits TONS and TONS of lines telling me how much of the file upload has been completed. Seriously ... uploading a 277 GiB file, I got the following output (I also attached the file).

20190211-Magni-NoBack_20190213030501.nbd…
Resolving s3.wasabisys.com…
Opening S3 connection to s3.wasabisys.com…
S3 connection opened…
Authenticating as HKIAYRYIVIYKGMHKPSN8…
Login successful…
Prepare 20190211-Magni-NoBack_20190213030501.nbd (Rename existing)…
Prepare 20190211-Magni-NoBack_20190213030501.nbd (Rename existing)…
Calculate checksum for 20190211-Magni-NoBack_20190213030501.nbd…
Uploading 20190211-Magni-NoBack_20190213030501.nbd…
[▮                             ] 0 B of 277.0 GiB
[▮                             ] 128.0 KiB (131,072 bytes) of 277.0 GiB (0%, 2.0 KB/sec, 42326.1 hours remaining)
[▮                             ] 288.0 KiB (294,912 bytes) of 277.0 GiB (0%, 4.4 KB/sec, 18844.3 hours remaining)

      more than 175,000 lines like the above, followed by

[▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮  ] 277.0 GiB (297,375,286,636 bytes) of 277.0 GiB (99%, 25.4 MB/sec, 1 seconds remaining)
[▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮  ] 277.0 GiB (297,376,892,268 bytes) of 277.0 GiB (99%, 25.4 MB/sec, 1 seconds remaining)
[▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮▮  ] 277.0 GiB (297,378,465,132 bytes) of 277.0 GiB (99%, 25.4 MB/sec, 1 seconds remaining)
Transfer incomplete…
Upload 20190211-Magni-NoBack_20190213030501.nbd failed. Your proposed upload exceeds the maximum allowed size. Please contact your web hosting service provider for assistance.

I can use the -q or --quiet parameters, but then I get NOTHING. It would be great if I could simply skip all the noise. Maybe a -n or --NoPercent parameter to suppress all the percent completed stats, and just get the task header and result?

PLEASE!! :-)

Attachments (1)

duck.txt (24.9 MB) - added by MarkBlaise on Feb 14, 2019 at 12:55:56 AM.
Duck CLI output redirected to this file

Change History (7)

Changed on Feb 14, 2019 at 12:55:56 AM by MarkBlaise

Duck CLI output redirected to this file

comment:1 Changed on Feb 14, 2019 at 9:46:09 AM by dkocher

  • Summary changed from Please provide option to not have so much output during Duck CLI Upload to Option to not have so much output during upload

comment:2 Changed on Feb 14, 2019 at 9:48:07 AM by dkocher

In a bash shell the transfer progress message should be replaced instead of adding a new line. What shell do you use to execute the command?

comment:3 Changed on Feb 14, 2019 at 9:48:38 AM by dkocher

  • Summary changed from Option to not have so much output during upload to Erase and restore cursor position in output does not work

comment:4 Changed on Feb 14, 2019 at 2:24:58 PM by MarkBlaise

Running in the Windows 8.1 and Windows 10 default Windows shell (not PowerShell), from either a Batch file or command window.

In Windows 8.1, multiple output lines appear both when Duck output is redirected to a file and when it is not (output emitted in a command window).

In Windows 10, multiple output lines appear only when Duck output is redirected to a file. When output is not redirected (output emitted in a command window), the same output line is repeatedly overwritten, as intended.

My goal is to be able to redirect output to a log file without all the extra lines. I don't know how you would do that ... if the newline is not written you will likely just get all of that output on one line. And I don't know if there is any way for Duck to be aware that its output has been redirected. Hence the request for a command line option to suppress the transfer stats.

comment:5 Changed on Feb 14, 2019 at 2:43:04 PM by dkocher

I suggest that you use --quiet and check the exit code of the program.

comment:6 Changed on Feb 14, 2019 at 5:02:05 PM by MarkBlaise

I have been using -q and then examining the return code from Duck, but Duck does not seem to provide a return code.

Here is my batch script code:

echo Wasabi user for %bckFolder% is "%wasUser%", folder is "%wasBckFolder%"  >> %logFile%
echo executing copy loop ...  >> %logFile%
for /F "tokens=*" %%A in (\\Odin\Backup-Staging\%bckFolder%\FileList.txt) do (
  echo %date% %time% Command = duck  -q -P -e rename --upload wasabisys://%wasUser%@%wasBckFolder%/%bckFolder%/ \\odin\Backup-Staging\%bckFolder%\%%A  >> %logFile%
  start /wait duck  -q -P -e rename --upload wasabisys://%wasUser%@%wasBckFolder%/%bckFolder%/ \\Odin\Backup-Staging\%bckFolder%\%%A  >> %logFile%
  echo Done %date% %time%, errorlevel = %errrorlevel%  >> %logFile%
)
echo Copy loop complete %date% %time%  >> %logFile%

Note the line at the end of the do loop:

echo Done %date% %time%, errorlevel = %errrorlevel% >> %logFile%

and here is the log file text

executing copy loop ...   
Thu 01/24/2019 17:03:03.23 Command = duck  -q -P -e rename --upload wasabisys://T5ZHIOV9VGMNBAKU1HQ4@Blaise-Backup/Magni/ Z:/Backup-Staging/Magni/20190121-Magni-Daily_20190124014500.nbd   

Upload complete…
Done Thu 01/24/2019 17:03:03.23, errorlevel =    
Copy loop complete Thu 01/24/2019 17:05:52.23   

the errorlevel appears not to be set ...

Note: See TracTickets for help on using tickets.
swiss made software