Files & Directories compression
Archive files or directories using various compression algorithms
tar_gz
Collect files to a tar
archive and compress the archive using gzip
.
Typical usage
Compress a file
host "app-host", hostname: "www.example.com"
job "config-backup" do
resource "file", path: "/etc/config/file", host: "app-host"
remotely as: "user" do
tar_gz
end
end
Compress a directory
host "app-host", hostname: "www.example.com"
job "config-backup" do
resource "directory", path: "/var/www/uploads", host: "app-host"
remotely as: "user" do
tar_gz
end
end
Input resources
Resources of type file
or directory
are allowed.
Output resource
A resource of type file
.
Command options
Option | Description | |
---|---|---|
delete_source | Indicate whether the source file or directory should be deleted after compression. Use with caution. | Required: no Defaults to: false |
Updated less than a minute ago