Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions _includes/v19.2/sql/diagrams/show_backup.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<div><svg width="304" height="36">

<polygon points="9 17 1 13 1 21"></polygon>
<polygon points="17 17 9 13 9 21"></polygon>
<rect x="31" y="3" width="64" height="32" rx="10"></rect>
<rect x="29" y="1" width="64" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="39" y="21">SHOW</text>
<rect x="115" y="3" width="74" height="32" rx="10"></rect>
<rect x="113" y="1" width="74" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="123" y="21">BACKUP</text>

<rect x="209" y="3" width="68" height="32"></rect>
<rect x="207" y="1" width="68" height="32" class="nonterminal"></rect>
<text class="nonterminal" x="217" y="21">location</text>

<path class="line" d="m17 17 h2 m0 0 h10 m64 0 h10 m0 0 h10 m74 0 h10 m0 0 h10 m68 0 h10 m3 0 h-3"></path>
<polygon points="295 17 303 13 303 21"></polygon>
<polygon points="295 17 287 13 287 21"></polygon>
</svg></div>
<div><svg width="453" height="69">
<polygon points="9 17 1 13 1 21"></polygon>
<polygon points="17 17 9 13 9 21"></polygon>
<rect x="31" y="3" width="64" height="32" rx="10"></rect>
<rect x="29" y="1" width="64" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="39" y="21">SHOW</text>
<rect x="115" y="3" width="74" height="32" rx="10"></rect>
<rect x="113" y="1" width="74" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="123" y="21">BACKUP</text>
<rect x="229" y="35" width="86" height="32" rx="10"></rect>
<rect x="227" y="33" width="86" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="237" y="53">SCHEMAS</text>
<rect x="355" y="3" width="70" height="32"></rect>
<rect x="353" y="1" width="70" height="32" class="nonterminal"></rect>
<text class="nonterminal" x="363" y="21">location</text><path class="line" d="m17 17 h2 m0 0 h10 m64 0 h10 m0 0 h10 m74 0 h10 m20 0 h10 m0 0 h96 m-126 0 h20 m106 0 h20 m-146 0 q10 0 10 10 m126 0 q0 -10 10 -10 m-136 10 v12 m126 0 v-12 m-126 12 q0 10 10 10 m106 0 q10 0 10 -10 m-116 10 h10 m86 0 h10 m20 -32 h10 m70 0 h10 m3 0 h-3"></path>
<polygon points="443 17 451 13 451 21"></polygon>
<polygon points="443 17 435 13 435 21"></polygon></svg></div>
27 changes: 27 additions & 0 deletions v19.2/show-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ Field | Description
`start_time` | The time at which the backup was started. For a full backup, this will be empty.
`end_time` | The time at which the backup was completed.
`size_bytes` | The size of the backup, in bytes.
`create_statement` | The `CREATE` statement used to create [table(s)](create-table.html), [view(s)](create-view.html), or [sequence(s)](create-sequence.html) that are stored within the backup. This displays when `SHOW BACKUP SCHEMAS` is used. Note that tables with references to [foreign keys](foreign-key.html) will only display foreign key constraints if the table to which the constraint relates to is also included in the backup.

## Example

### Show a backup

{% include copy-clipboard.html %}
~~~ sql
> SHOW BACKUP 'azure://acme-co-backup/tpch-2017-03-27-full?AZURE_ACCOUNT_KEY=hash&AZURE_ACCOUNT_NAME=acme-co';
Expand All @@ -59,6 +62,30 @@ Field | Description
Time: 32.540353ms
~~~

### Show a backup with schemas

{% include copy-clipboard.html %}
~~~ sql
> SHOW BACKUP SCHEMAS 'nodelocal:///extern/employee.sql';
~~~

~~~
database_name | table_name | start_time | end_time | size_bytes | rows | create_statement
+---------------+------------+------------+----------------------------------+------------+------+-------------------------------------------------------------+
movr | users | NULL | 2019-09-19 14:51:03.943785+00:00 | 4913 | 50 | CREATE TABLE users (
| | | | | | id UUID NOT NULL,
| | | | | | city VARCHAR NOT NULL,
| | | | | | name VARCHAR NULL,
| | | | | | address VARCHAR NULL,
| | | | | | credit_card VARCHAR NULL,
| | | | | | CONSTRAINT "primary" PRIMARY KEY (city ASC, id ASC),
| | | | | | FAMILY "primary" (id, city, name, address, credit_card)
| | | | | | )
(1 row)

Time: 30.337ms
~~~

## See also

- [`BACKUP`](backup.html)
Expand Down