summaryrefslogtreecommitdiff
path: root/man/ostree-create-usb.xml
blob: 600d7ce93c3d548c9d99c5a62f93782ca4a8438f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<!--
Copyright 2018 Matthew Leeds <matthew.leeds@endlessm.com>

SPDX-License-Identifier: LGPL-2.0+

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <https://www.gnu.org/licenses/>.
-->

<refentry id="ostree">

    <refentryinfo>
        <title>ostree create-usb</title>
        <productname>OSTree</productname>

        <authorgroup>
            <author>
                <contrib>Developer</contrib>
                <firstname>Matthew</firstname>
                <surname>Leeds</surname>
                <email>matthew.leeds@endlessm.com</email>
            </author>
        </authorgroup>
    </refentryinfo>

    <refmeta>
        <refentrytitle>ostree create-usb</refentrytitle>
        <manvolnum>1</manvolnum>
    </refmeta>

    <refnamediv>
        <refname>ostree-create-usb</refname>
        <refpurpose>Put the given refs on an external drive for P2P distribution.</refpurpose>
    </refnamediv>

    <refsynopsisdiv>
            <cmdsynopsis>
                <command>ostree create-usb</command> <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">MOUNT-PATH</arg> <arg choice="req">COLLECTION-ID REF</arg> <arg choice="opt" rep="repeat">COLLECTION-ID REF</arg>
            </cmdsynopsis>
    </refsynopsisdiv>

    <refsect1>
        <title>Description</title>

        <para>
            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
            <citerefentry><refentrytitle>ostree-find-remotes</refentrytitle><manvolnum>1</manvolnum></citerefentry>
            for more information on P2P distribution.
        </para>
        <para>
            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 <filename>.ostree/repos.d</filename> are checked,
            then <filename>.ostree/repo</filename>, <filename>ostree/repo</filename>,
            and <filename>var/lib/flatpak/repo</filename> are checked. By default
            <command>ostree create-usb</command> uses <filename>.ostree/repo</filename>,
            but if you specify another location using <option>--destination-repo</option>
            a symbolic link will be created for you in <filename>.ostree/repos.d</filename>.
        </para>
        <para>
            This command will regenerate the <filename>summary</filename> 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.
        </para>
    </refsect1>

    <refsect1>
        <title>Options</title>

        <variablelist>
            <varlistentry>
                <term><option>--disable-fsync</option></term>

                <listitem><para>
                  Do not invoke fsync().
                </para>
                </listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--destination-repo</option>=DEST</term>

                <listitem><para>
                  Create the repository in DEST under MOUNT-PATH, rather than
                  the default location.
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--commit</option>=COMMIT</term>

                <listitem><para>
                  Pull COMMIT instead of whatever REF points to. This can only
                  be used if a single ref is specified.
                </para></listitem>
            </varlistentry>

        </variablelist>
    </refsect1>

    <refsect1>
        <title>Example</title>
        <para><command>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</command></para>
<programlisting>

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’.

</programlisting>
    </refsect1>
</refentry>