tar

package
v0.0.0-...-8f1a291 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 4 Imported by: 0

README

Pukcab module: Tape Archive (tar)

Module name: tar

This module enables you to create a gzipped-tarball of given source files or directories

Requirements

  • The tar or gtar executable must be installed on the backup host

Configuration

Key Type Description
tar_path string (Optional) Path to tar executable to use. Defaults to tar.
tarball_name string The output tarball name. Be sure to include the tar.gz or .tgz extension.
sources []string Array of paths to add to the tarball.

Example

{
    "name": "tar",
    "config": {
        "tarball_name": "network-scripts.tar.gz",
        "sources": [
            "/etc/sysconfig/network-scripts/"
        ],
    }
}

Documentation

Index

Constants

View Source
const Name = "tar"

Variables

This section is empty.

Functions

This section is empty.

Types

type TarConfig

type TarConfig struct {
	TarPath     string   `json:"tar_path"`
	TarballName string   `json:"tarball_name"`
	Sources     []string `json:"sources"`
}

type TarModule

type TarModule struct{}

TarModule the Tar pukcab module

func (TarModule) Name

func (m TarModule) Name() string

func (TarModule) Run

func (m TarModule) Run(c interface{}) ([]pukcab.File, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL