Commit | Line | Data |
---|---|---|
b3903b3a PP |
1 | lttng-save(1) |
2 | ============= | |
e9711845 | 3 | :revdate: 14 June 2021 |
b3903b3a PP |
4 | |
5 | ||
6 | NAME | |
7 | ---- | |
e9711845 | 8 | lttng-save - Save LTTng recording session configurations |
b3903b3a PP |
9 | |
10 | ||
11 | SYNOPSIS | |
12 | -------- | |
13 | [verse] | |
42a43108 PP |
14 | *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *save* [option:--force] [option:--output-path='DIR'] |
15 | [option:--all | 'SESSION'] | |
b3903b3a PP |
16 | |
17 | ||
18 | DESCRIPTION | |
19 | ----------- | |
26f0c779 | 20 | The `lttng save` command saves to files the configurations of: |
b3903b3a | 21 | |
26f0c779 | 22 | With the 'SESSION' argument:: |
e9711845 | 23 | The recording session named 'SESSION'. |
b3903b3a | 24 | |
26f0c779 | 25 | Without the 'SESSION' argument:: |
e9711845 | 26 | Implicit option:--all option: *all* the recording sessions of the |
42a43108 PP |
27 | connected session daemon for your Unix user, or for all users if |
28 | your Unix user is `root`, as listed in the output of `lttng list` | |
29 | (see man:lttng-list(1)). | |
26f0c779 PP |
30 | + |
31 | See the ``Session daemon connection'' section of man:lttng(1) to learn | |
32 | how a user application connects to a session daemon. | |
33 | ||
e9711845 | 34 | See man:lttng-concepts(7) to learn more about recording sessions. |
26f0c779 PP |
35 | |
36 | Use the `save` command in conjunction with the man:lttng-load(1) command | |
e9711845 | 37 | to save and restore the complete configurations of recording sessions. |
26f0c779 | 38 | |
e9711845 | 39 | The `save` command does :not: save tracing data, only the recording |
26f0c779 PP |
40 | session parameters, including the channel and recording event rule |
41 | configurations. | |
b3903b3a PP |
42 | |
43 | The default output directory path is `$LTTNG_HOME/.lttng/sessions` | |
26f0c779 | 44 | (`$LTTNG_HOME` defaults to `$HOME`). Override the default output |
e9711845 | 45 | directory path with the option:--output-path option. Each recording |
26f0c779 | 46 | session configuration file is named __SNAME__++.lttng++, |
e9711845 | 47 | where{nbsp}__SNAME__ is the original recording session name. |
b3903b3a | 48 | |
e9711845 | 49 | By default, the `save` command does :not: overwrite existing recording |
26f0c779 | 50 | session configuration files: the command fails. Allow the `save` command |
e9711845 | 51 | to overwrite existing recording session configuration files with the |
26f0c779 | 52 | option:--force option. |
b3903b3a | 53 | |
da39b67c | 54 | See the ``<<examples,EXAMPLES>>'' section below for usage examples. |
80950c2c | 55 | |
b3903b3a | 56 | |
f5511eea | 57 | include::common-lttng-cmd-options-head.txt[] |
b3903b3a PP |
58 | |
59 | ||
60 | option:-a, option:--all:: | |
e9711845 PP |
61 | Save all the recording session configurations of your Unix user, or |
62 | of all users if your Unix user is `root`, as listed in the output of | |
63 | man:lttng-list(1), instead of the current recording session or the | |
64 | recording session named 'SESSION'. | |
b3903b3a PP |
65 | |
66 | option:-f, option:--force:: | |
e9711845 | 67 | Overwrite existing recording session configuration files when |
b3903b3a PP |
68 | saving. |
69 | ||
26f0c779 | 70 | option:-o 'DIR', option:--output-path='DIR':: |
e9711845 | 71 | Save recording session configuration files to the directory 'DIR' |
26f0c779 PP |
72 | instead of `$LTTNG_HOME/.lttng/sessions` (`$LTTNG_HOME` defaults to |
73 | `$HOME`). | |
b3903b3a PP |
74 | |
75 | ||
f5511eea | 76 | include::common-lttng-cmd-help-options.txt[] |
b3903b3a PP |
77 | |
78 | ||
f5511eea PP |
79 | include::common-lttng-cmd-after-options.txt[] |
80 | ||
81 | ||
80950c2c PP |
82 | [[examples]] |
83 | EXAMPLES | |
84 | -------- | |
e9711845 | 85 | .Save all the recording session configurations to the default output directory. |
80950c2c PP |
86 | ==== |
87 | [role="term"] | |
88 | ---- | |
89 | $ lttng save | |
90 | ---- | |
91 | ==== | |
92 | ||
e9711845 | 93 | .Save a specific recording session configuration to a specific output directory. |
80950c2c PP |
94 | ==== |
95 | See the option:--output-path option. | |
96 | ||
97 | [role="term"] | |
98 | ---- | |
99 | $ lttng save my-session --output-path=/path/to/sessions | |
100 | ---- | |
101 | ==== | |
102 | ||
e9711845 | 103 | .Allow LTTng to overwrite existing recording session configuration files when saving. |
80950c2c PP |
104 | ==== |
105 | See the option:--force option. | |
106 | ||
107 | [role="term"] | |
108 | ---- | |
109 | $ lttng save --force | |
110 | ---- | |
111 | ==== | |
112 | ||
113 | ||
f5511eea | 114 | include::common-footer.txt[] |
b3903b3a PP |
115 | |
116 | ||
117 | SEE ALSO | |
118 | -------- | |
26f0c779 | 119 | man:lttng(1), |
af1c4164 PP |
120 | man:lttng-load(1), |
121 | man:lttng-concepts(7) |