# Commands

## Run

This is the command that you use to run the backup, here is how you use it

```
bqckup run
```

It also supports several parameters, to force a backup run even if it’s not on schedule:

```
bqckup run --force
```

To run a backup for a single site:

```
bqckup run --site mywebsite
```

Here, `mywebsite` is the backup name, which you can set in the `name` field inside `/etc/bqckup/sites/domain.yml`\\

You can also choose to run either an incremental or a full backup using this command.

```
bqckup --verbose run --site mywebstite --incremental | --full
```

## History

The backup history can be viewed using the following command:

```
bqckup history --site {site_name}
```

`site_name` also refers to the value of `name` inside `/etc/bqckup/sites/domain.yml`.

## Get List

You can get a list of files that were successfully backed up by running this command:

```
bqckup get-list {site_name} --full-id
```

`--full-id`: show the full ID of incremental snapshots

## Generate Link

If you want to download the backup, you can use this command to generate the link:

```
bqckup generate-link {storage_name} {object_path}
```

## Restore

{% hint style="info" %}
Currently, **bqckup** can only restore incremental backups.
{% endhint %}

to perform a restore, use this command:

```shell
bqckup restore {site_name} --snapshot {snapshot_id|default:latest} --target {target_dir|default:directory_source}
```

`site_name`: the name of the site configuration (e.g. domain.com)

`--snapshot`: optional; specify the snapshot ID to restore. If not provided, the latest snapshot will be used.

`--target`: optional; specify the target directory to restore files to. By default, files will be restored to their original source directory.

You can view available snapshot IDs by running:

```
bqckup history --site {site_name}
```

The snapshot ID is shown under the file name field in the history output.

Alternatively, you can use:

```shell
bqckup get-list {site_name}
```

Snapshot ID can be found in the Incremental Backups table.

## Environment Variable

* `BQCKUP_DEBUG`: enables detailed error output and full tracebacks for debugging purposes.
* `BQCKUP_VERBOSE`: displays more detailed runtime information, including internal process details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bqckup.com/bqckup-documentation/cli/list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
