cmd

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "ibackup",
	Short: "ibackup backs up local files to iRODS",
	Long: `ibackup backs up local files to iRODS.

For automated backups via an ibackup server, use the add and status
sub-commands, eg.:

echo /abs/path/to/file1.txt > files.txt
echo /abs/path/to/file2.txt >> files.txt
echo /abs/path/to/dir1 > dirs.txt
echo /abs/path/to/dir2 >> dirs.txt
ibackup add -n myfirstbackup -t 'humgen' -f files.txt -d dirs.txt
ibackup status

(You'll need the IBACKUP_SERVER_URL and IBACKUP_SERVER_CERT environment
variables set up for you by whoever started the server.)


For manual backups, use the addremote and put sub-commands, eg. to backup
everything in a directory:

find /abs/path/to/dir -type f -print0 | ibackup addremote --humgen -0 -b | ibackup put -b
`,
}

RootCmd represents the base command when called without any subcommands.

View Source
var Version string

Version gets set during build: go build -ldflags "-X github.com/wtsi-hgi/ibackup/cmd.Version=`git describe --tags --always --long --dirty`" .

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type JWTPermissionsError added in v0.2.0

type JWTPermissionsError struct {
	// contains filtered or unexported fields
}

JWTPermissionsError is used to distinguish this type of error - where the already stored JWT token doesn't have private permissions.

func (JWTPermissionsError) Error added in v0.2.0

func (e JWTPermissionsError) Error() string

Error is the print out string for JWTPermissionsError, so the user can see and rectify the permissions issue.

Jump to

Keyboard shortcuts

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