Search

vcli file

Handle files

Synopsis

Handle files such as listing, add, delete or update.

Examples:

 files list
 files list -f name="*myfile*" -f created_at="*13:37*"

	# Set name and label, which will be used for all new versions from this point on.
 files update 1 --name MyFileName --label mylabel

	# Inspect file itself
 files inspect 1

	# Inspect a version for a file
 files inspect 1 -v 1

	# Create a new file, this will also create a first version of the file.
 files add MyFileName /path/to/my.file

	# Edit the latest version and save as a new version if changes has been made.
 files edit 1

	# Compilation of files on disk on agents with id 1 and 2
 files compile -f main.vcl -i myinc.vcl --validate agents=1,2

	# Compilation of a mix of files on disk and in the Controller on a random agent
 files compile -f main.vcl -i myinc.vcl --inc 2:latest

	# Compile a main VCL in Controller with an include on disk on all running agents
 files compile --vcl 1:1 -i myinc.vcl --validate all

	# Create a new version of a file (No new version will be created if latest version is the same)
 files new 1 --descr "Some description" --file file.vcl

	# Delete a file and all its versions (if not in use)
 files delete 1

	# Delete a specific version for a file
 files delete 1 -v 1

	# List versions for a file
 files versions 1

	# Download file (latest if no version is specified) and save to given file.
 files download 1 --file /path/filename.file

	# Download a specific version of the file
 files download 1 --version 12 --file /path/filename.file

	# Diff two versions of a file with ID 1, version 2 and 3.
	# Exit code is same as for diff (0 = no diff, 1 = diff)
 diff 1 2 3

	

Options

  -h, --help   help for file

Options inherited from parent commands

  -c, --config string   configuration file for the CLI (default ~/.vcli.yml)
                        Could also be set via VARNISH_CONTROLLER_CLI_CONFIG=/path/to/config.yml
      --csv             Output the response table as CSV format.
  -j, --json            Output the response table as JSON format.

SEE ALSO


®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203