Ticket #2376 (closed enhancement: fixed)

Opened 2 years ago

Last modified 20 months ago

Feat Req: ZIP/TAR via SSH

Reported by: macmedix@… Owned by: dkocher
Priority: normal Milestone: 3.1
Component: sftp Version: 3.0.1
Severity: trivial Keywords: zip ssh tar archive
Cc: macmedix@… Platform:
Architecture:

Description

It would be really great if you could add a feature to compress or decompress a remote file when we are connected via SSH. This would be so very helpful!!! Ideally ZIP, but tar would do. This could either be a right-click command, and/or an action menu item.

Change History

comment:1 Changed 2 years ago by dkocher

  • Status changed from new to closed
  • Resolution set to wontfix

comment:2 Changed 23 months ago by anonymous

  • Status changed from closed to reopened
  • Resolution wontfix deleted

would be great!

comment:3 follow-up: ↓ 4 Changed 21 months ago by dkocher

  • Status changed from reopened to new
  • Component changed from core to sftp
  • Milestone changed from 3.2 to 3.1

We will try to push this into 3.1. Will only work for SSH connections.

comment:4 in reply to: ↑ 3 Changed 21 months ago by macmedix@…

Replying to dkocher:

We will try to push this into 3.1. Will only work for SSH connections.

AWESOME! This will be a VERY helpful feature. Thank you! Thank you! Thank you! Thank you!

comment:5 Changed 21 months ago by dkocher

  • Status changed from new to closed
  • Resolution set to fixed

In r4316. Available configuration options:

  • For archiving. For {0} the absolute path is given.
    defaults write ch.sudo.cyberduck archive.command -string "tar -czpPfv {0}.tar.gz {0}"
    
  • For unarchiving. {0} is the absolute path to unarchive, {1} is the destination directory
    defaults write ch.sudo.cyberduck unarchive.command.zip -string "unzip {0} -d {1}"
    defaults write ch.sudo.cyberduck unarchive.command.tar -string "tar -xvpPf {0} -C {1}"
    defaults write ch.sudo.cyberduck unarchive.command.tgz -string "tar -xzvpPf {0} -C {1}"
    defaults write ch.sudo.cyberduck unarchive.command.tar.gz -string "tar -xzvpPf {0} -C {1}"
    defaults write ch.sudo.cyberduck unarchive.command.tar.bz2 -string "tar -xjvpPf {0} -C {1}"
    

comment:6 Changed 21 months ago by dkocher

Fixed default archive command in r4317.

comment:7 Changed 21 months ago by dkocher

Please consider the above commands as deprecated. They have been replaced in the final implementation with

defaults write ch.sudo.cyberduck archive.command.create.tar -string "tar -cvpPf {0}.tar {0}"
defaults write ch.sudo.cyberduck archive.command.create.tar.gz -string "tar -czvpPf {0}.tar.gz {0}"
defaults write ch.sudo.cyberduck archive.command.create.tar.bz2 -string "tar -cjvpPf {0}.tar.bz2 {0}"
defaults write ch.sudo.cyberduck archive.command.create.zip -string "zip -rv {0}.zip {0}"

defaults write ch.sudo.cyberduck archive.command.expand.tar -string "tar -xvpPf {0} -C {1}"
defaults write ch.sudo.cyberduck archive.command.expand.tar.gz -string "tar -xzvpPf {0} -C {1}"
defaults write ch.sudo.cyberduck archive.command.expand.tar.bz2 -string "tar -xjvpPf {0} -C {1}"
defaults write ch.sudo.cyberduck archive.command.expand.zip -string "unzip -n {0} -d {1}"

The default archiver command is set using

defaults write ch.sudo.cyberduck archive.default -string "tar.gz"

comment:8 Changed 20 months ago by anonymous

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Severity changed from normal to trivial

Would it be possible also to add regular .gz files? It would be convenient for mysql slow query logs. Thanks :-)

comment:9 follow-up: ↓ 10 Changed 20 months ago by macmedix@…

  • Cc macmedix@… added
  • Keywords tar archive added

Filenames & Pathnames which contain a space are a problem, and prevent this awesome feature from creating archives. as of Version 3.1.1 (4457). Spaces will need to be encoded, or otherwise dealt with. Thanks very much!

comment:10 in reply to: ↑ 9 Changed 20 months ago by dkocher

  • Status changed from reopened to closed
  • Resolution set to fixed

Replying to macmedix@…:

Filenames & Pathnames which contain a space are a problem, and prevent this awesome feature from creating archives. as of Version 3.1.1 (4457). Spaces will need to be encoded, or otherwise dealt with. Thanks very much!

That should be fixed in the nightly build. Refer to #2884.

Note: See TracTickets for help on using tickets.