ostree create-usb

OSTree
Developer Matthew Leeds matthew.leeds@endlessm.com
ostree create-usb 1
ostree-create-usb Put the given refs on an external drive for P2P distribution.
`ostree create-usb` OPTIONS MOUNT-PATH COLLECTION-ID REF COLLECTION-ID REF

## Description

This command creates a repository in MOUNT-PATH and pulls the given REF(s) into it so they can be found and pulled from (perhaps by another computer that's offline). See ostree-find-remotes 1 for more information on P2P distribution.

In order for ostree to pull refs from a mounted filesystem (such as a USB drive) the repo must be in a standard location. Specifically, subdirectories of `.ostree/repos.d` are checked, then `.ostree/repo`, `ostree/repo`, and `var/lib/flatpak/repo` are checked. By default `ostree create-usb` uses `.ostree/repo`, but if you specify another location using `--destination-repo` a symbolic link will be created for you in `.ostree/repos.d`.

This command will regenerate the `summary` file in the destination repo so that it stays accurate, so you shouldn't try to use summary signatures in the destination repo. This shouldn't be a concern because clients that support pulling from USB mounts use signed per-repo and per-commit metadata instead of summary signatures.

This command relies on the summary file in the source repo, so you may want to run `ostree summary -u` before running this command.

## Options

`--disable-fsync`

  Do not invoke fsync().

`--destination-repo`=DEST

  Create the repository in DEST under MOUNT-PATH, rather than the default location.

## Example

`ostree --repo=/var/lib/flatpak/repo create-usb /run/media/mwleeds/f6d04c7a-60f6-4ba3-bb96-0f40498675be com.exampleos.Apps app/org.kde.Khangman/x86_64/stable com.exampleos.Apps ostree-metadata com.exampleos.Apps appstream/x86_64`

    5 metadata, 213 content objects imported; 1 KiB transferred in 1 seconds                                                                                                                      Copied 3/3 refs successfully from ‘/var/lib/flatpak/repo’ to ‘.ostree/repo’ repository in ‘/run/media/mwleeds/f6d04c7a-60f6-4ba3-bb96-0f40498675be’.