Uploading Files with the CLI

You can upload files with the Beam CLI using the beam cp command.

Usage: beam cp [OPTIONS] LOCAL_PATH REMOTE_PATH

  Copy contents to a volume.

Options:
  -c, --context TEXT  The config context to use.
  -h, --help          Show this message and exit.

Match Syntax:
  This command provides support for Unix shell-style wildcards, which are not the same as regular expressions.

  *       matches everything
  ?       matches any single character
  [seq]   matches any character in `seq`
  [!seq]  matches any character not in `seq`

  For a literal match, wrap the meta-characters in brackets. For example, '[?]' matches the character '?'.

Examples:

  # Copy contents to a remote volume
  beam cp mydir myvol/subdir
  beam cp myfile.txt myvol/subdir

  # Use a question mark to match a single character in a path
  beam cp 'mydir/?/data?.json' myvol/sub/path

  # Use an asterisk to match all characters in a path
  beam cp 'mydir/*/*.json' myvol/data

  # Use a sequence to match a specific set of characters in a path
  beam cp 'mydir/[a-c]/data[0-1].json' myvol/data

  # Escape special characters if you don't want to single quote your local path
  beam cp mydir/\[a-c\]/data[0-1].json' myvol/data
  beam cp mydir/\?/data\?.json myvol/sub/path

Uploading Files with the Dashboard

You can also upload files with the web dashboard, on the volumes page.