Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade packages #307

Merged
merged 6 commits into from
Feb 6, 2024
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
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go_version }}
check-latest: true
Expand All @@ -46,16 +46,17 @@ jobs:
shell: bash

- name: Code coverage with codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
env_vars: OS,GO
file: ./coverage.out
flags: unittests
fail_ci_if_error: false
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Archive code coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code-coverage-report-${{ matrix.os }}
path: coverage.out
Expand All @@ -67,13 +68,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0

- name: Download code coverage results
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Display structure of downloaded files
run: ls -R
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ~1.21

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
steps:

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ~1.21

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Unshallow
run: git fetch --prune --unshallow

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ~1.21

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -36,7 +36,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean --debug
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,9 @@ syslog-ng:
lscr.io/linuxserver/syslog-ng:latest

checkdoc:
@echo "[*] $@"
$(GOCMD) run ./config/checkdoc -r docs/content

checklinks:
@echo "[*] $@"
muffet -b 8192 http://localhost:1313/resticprofile/
20 changes: 10 additions & 10 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ With resticprofile:
* You can run the forget command before or after a backup (in a section called *retention*)
* You can check a repository before or after a backup
* You can create groups of profiles that will run sequentially
* You can run [shell commands]({{< ref "/configuration/run_hooks" >}}) before or after running a profile: useful if you need to mount and unmount your backup disk for example
* You can run a [shell command]({{< ref "/configuration/run_hooks" >}}) if an error occurred (at any time)
* You can run [shell commands]({{% relref "/configuration/run_hooks" %}}) before or after running a profile: useful if you need to mount and unmount your backup disk for example
* You can run a [shell command]({{% relref "/configuration/run_hooks" %}}) if an error occurred (at any time)
* You can send a backup stream via _stdin_
* You can start restic at a lower or higher priority (Priority Class in Windows, *nice* in all unixes) and/or _ionice_ (only available on Linux)
* It can check that you have [enough memory]({{< ref "/usage/memory" >}}) before starting a backup. (I've had some backups that literally killed a server with swap disabled)
* You can generate cryptographically secure random keys to use as a restic [key file]({{< ref "/usage/keyfile" >}})
* You can easily [schedule]({{< ref "/schedules" >}}) backups, retentions and checks (works for *systemd*, *crond*, *launchd* and *windows task scheduler*)
* You can generate a simple [status file]({{< ref "/status" >}}) to send to some monitoring software and make sure your backups are running fine
* It can check that you have [enough memory]({{% relref "/usage/memory" %}}) before starting a backup. (I've had some backups that literally killed a server with swap disabled)
* You can generate cryptographically secure random keys to use as a restic [key file]({{% relref "/usage/keyfile" %}})
* You can easily [schedule]({{% relref "/schedules" %}}) backups, retentions and checks (works for *systemd*, *crond*, *launchd* and *windows task scheduler*)
* You can generate a simple [status file]({{% relref "/status" %}}) to send to some monitoring software and make sure your backups are running fine
* You can use a template syntax in your configuration file
* You can generate scheduled tasks using *crond*
* Get backup statistics in your [status file]({{< ref "/status" >}})
* Automatically clear up [stale locks]({{< ref "/usage/locks" >}})
* Export a [prometheus]({{< ref "/status/prometheus" >}}) file after a backup, or send the report to a push gateway automatically
* Get backup statistics in your [status file]({{% relref "/status" %}})
* Automatically clear up [stale locks]({{% relref "/usage/locks" %}})
* Export a [prometheus]({{% relref "/status/prometheus" %}}) file after a backup, or send the report to a push gateway automatically
* **[new for v0.17.0]** Run shell commands in the background when non fatal errors are detected from restic
* **[new for v0.18.0]** Send messages to [HTTP hooks]({{< ref "/configuration/http_hooks" >}}) before, after a successful or failed job (backup, forget, check, prune, copy)
* **[new for v0.18.0]** Send messages to [HTTP hooks]({{% relref "/configuration/http_hooks" %}}) before, after a successful or failed job (backup, forget, check, prune, copy)
* **[new for v0.18.0]** Automatically initialize the secondary repository using `copy-chunker-params` flag
* **[new for v0.18.0]** Send resticprofile logs to a syslog server
* **[new for v0.19.0]** Preventing your system from idle sleeping
Expand Down
10 changes: 5 additions & 5 deletions docs/content/configuration/getting_started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ weight: 2

In a nutshell, **resticprofile** provides a configuration file and a runner that will generate all the necessary calls to **restic**.

Unless you're using the **resticprofile** [Docker image]({{< ref "/installation/docker" >}}), you need to have **restic** [installed on your machine](https://restic.readthedocs.io/en/stable/).
Unless you're using the **resticprofile** [Docker image]({{% relref "/installation/docker" %}}), you need to have **restic** [installed on your machine](https://restic.readthedocs.io/en/stable/).

## Choose your favourite format

Expand All @@ -30,7 +30,7 @@ HCL can be interesting if you already use a tool from the Hashicorp stack otherw

We're going to show you how to get documentation and auto-completion for the **resticprofile** configuration using [Visual Studio Code](https://code.visualstudio.com/).

You can use any other editor that recognise the [JSON schema]({{< ref "/configuration/jsonschema" >}}). The same JSON schema can be used for JSON, TOML and YAML file formats.
You can use any other editor that recognise the [JSON schema]({{% relref "/configuration/jsonschema" %}}). The same JSON schema can be used for JSON, TOML and YAML file formats.

### TOML

Expand Down Expand Up @@ -139,7 +139,7 @@ default {

## Generate a secure password

**resticprofile** has a handy command that can generate a [cryptographically secure password file]({{< ref "/usage/keyfile" >}}) for you:
**resticprofile** has a handy command that can generate a [cryptographically secure password file]({{% relref "/usage/keyfile" %}}) for you:

```shell
resticprofile generate --random-key > password.txt
Expand Down Expand Up @@ -309,7 +309,7 @@ default {
{{% /tab %}}
{{< /tabs >}}

**resticprofile** can [schedule]({{< ref "/schedules" >}}) work on macOS, Windows, most Unixes and Linux distributions: it is simply adding an entry in the default scheduler of your platform.
**resticprofile** can [schedule]({{% relref "/schedules" %}}) work on macOS, Windows, most Unixes and Linux distributions: it is simply adding an entry in the default scheduler of your platform.

To schedule the backup of the default profile, simply type the command:

Expand Down Expand Up @@ -372,4 +372,4 @@ Flags:

## Next

Let's have a look at some [examples]({{< ref "/configuration/examples" >}})
Let's have a look at some [examples]({{% relref "/configuration/examples" %}})
2 changes: 1 addition & 1 deletion docs/content/configuration/http_hooks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ weight: 22

## Send HTTP messages before and after a job

As well as being able to run [shell commands]({{< ref "run_hooks" >}}), you can now send HTTP messages before, after (success or failure) running a restic command.
As well as being able to run [shell commands]({{% relref "run_hooks" %}}), you can now send HTTP messages before, after (success or failure) running a restic command.

The sections that allow sending HTTP hooks are:
- backup
Expand Down
6 changes: 3 additions & 3 deletions docs/content/configuration/include/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@ global {
Included configuration files may use any supported format and settings are merged so that multiple files can extend the same profiles.
The HCL format is special in that it cannot be mixed with other formats.

Within included files, the current [configuration path]({{< ref "/configuration/path/#how-paths-inside-the-configuration-are-resolved" >}}) is not changed. Path resolution remains relative to the path of the main configuration file.
Within included files, the current [configuration path]({{% relref "/configuration/path/#how-paths-inside-the-configuration-are-resolved" %}}) is not changed. Path resolution remains relative to the path of the main configuration file.

{{% notice style="note" %}}
Included files cannot include nested files. Specifying `includes` inside an included file has no effect.
{{% /notice %}}

## Configuration Merging

Loading a configuration file involves loading the physical file from disk and applying all [variables]({{< ref "/configuration/variables" >}}) and [templates]({{< ref "/configuration/templates" >}}) prior to parsing the file in a supported format `hcl`, `json`, `toml` and `yaml`. This means [variables]({{< ref "/configuration/variables" >}}) and [templates]({{< ref "/configuration/templates" >}}) must create valid configuration markup that can be parsed or loading will fail.
Loading a configuration file involves loading the physical file from disk and applying all [variables]({{% relref "/configuration/variables" %}}) and [templates]({{% relref "/configuration/templates" %}}) prior to parsing the file in a supported format `hcl`, `json`, `toml` and `yaml`. This means [variables]({{% relref "/configuration/variables" %}}) and [templates]({{% relref "/configuration/templates" %}}) must create valid configuration markup that can be parsed or loading will fail.

Configuration files are loaded and applied in a fixed order:

1. The main configuration file is loaded first
2. `includes` are iterated in declaration order:
* Every item may be a single file path or glob expression
* Glob expressions are resolved and iterated in alphabetical order
* All paths are resolved relative to [configuration path]({{< ref "/configuration/path/#how-paths-inside-the-configuration-are-resolved" >}})
* All paths are resolved relative to [configuration path]({{% relref "/configuration/path/#how-paths-inside-the-configuration-are-resolved" %}})

Configuration files are loaded in the following order when assuming `/etc/resticprofile/profiles.conf` with `includes = ["first.conf", "conf.d/*.conf", "last.conf"]`:
```
Expand Down
Loading
Loading