Add autocast gettingstarted file

This commit is contained in:
Alexander Weiss 2023-07-21 15:00:21 +02:00
parent 244db5211e
commit d9388637dc
9 changed files with 110 additions and 3 deletions

View File

@ -4,6 +4,7 @@ on:
- main
paths-ignore:
- "**/*.md"
- "docs/**"
push:
branches:
- main

View File

@ -4,6 +4,7 @@ on:
- main
paths-ignore:
- "**/*.md"
- "docs/**"
push:
branches:
- main

View File

@ -4,6 +4,7 @@ on:
- main
paths-ignore:
- "**/*.md"
- "docs/**"
push:
branches:
- main

View File

@ -30,9 +30,7 @@ You can ask questions in the [Discussions][3] or have a look at the [FAQ](docs/F
## Quick start
![rustic init](https://github.com/rustic-rs/rustic/blob/main/docs/screenshots/rustic.png?raw=true)
![rustic restore](https://github.com/rustic-rs/rustic/blob/main/docs/screenshots/rustic-restore.png?raw=true)
![rustic getting started](https://github.com/rustic-rs/rustic/blob/main/docs/screenshots/gettingstarted.gif?raw=true)
## Are binaries available?

3
config/simple.toml Normal file
View File

@ -0,0 +1,3 @@
[repository]
repository = "/tmp/repo"
password = "test"

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

View File

@ -0,0 +1,103 @@
# gettingstarted.yaml
# Short example how to use rustic
# start in the project main dir by: autocast docs/screenshots/gettingstarted.yaml out.cast
settings:
title: autocast example
environment:
prompt: "[rustic]$ "
instructions:
# Setup
- !Command
command: rm -rf /tmp/repo
hidden: true
- !Command
command: alias rustic=target/release/rustic
hidden: true
- !Command
command: mv ~/.config/rustic/rustic.toml rustic-tmp-save.toml
hidden: true
- !Command
command: cp config/simple.toml ~/.config/rustic/rustic.toml
hidden: true
- !Command
command: "# Welcome to rustic!"
- !Command
command: "# rustic is a command-line backup tool which provides encrypted and deduplicated backups to various repositories."
- !Marker Initialization
- !Command
command: "# In this demo, we use a config file to define a local repository:"
- !Command
command: cat ~/.config/rustic/rustic.toml
- !Wait 2s
- !Command
command: "# First, we need to init the repository as it doesn't exist yet."
- !Command
command: rustic init
- !Marker Backup
- !Command
command: "# Now, we can start our first backup..."
- !Command
command: rustic backup src/
- !Wait 1s
- !Command
command: "# This created a snapshot in the repository. You can use the \"snapshots\" command to display snapshots:"
- !Command
command: rustic snapshots
- !Wait 2s
- !Command
command: "# Let us re-run the backup..."
- !Command
command: rustic backup src/
- !Command
command: rustic snapshots
- !Wait 2s
- !Command
command: "# This second backup run realized that there was no change and created a new snapshot with identical content"
- !Command
command: "# as the fist backup. This is indicated by the (+1) which shows how many identical backups exist."
- !Wait 2s
- !Command
command: "# Let's add some file and do another backup..."
- !Command
command: echo "This is a test file" > src/testfile
- !Command
command: rustic backup src/
- !Wait 1s
- !Command
command: "# This again was very fast as it only needed to process that added file. But still, it generated a full snapshot:"
- !Command
command: rustic snapshots
- !Wait 2s
- !Marker Restore
- !Command
command: "# Now, we remove the added file..."
- !Command
command: rm src/testfile
- !Command
command: "# ...but it is still contained in the latest snapshot. Let's restore from this snapshot!"
- !Command
command: rustic restore latest:src/ src/
- !Wait 2s
- !Command
command: "# Note that rustic checks existing contents and only restores what's needed if your target dir exists!"
- !Command
command: "# Let's see if the file was restored correctly..."
- !Command
command: cat src/testfile
- !Wait 2s
- !Command
command: "# Enjoy your backups with rustic!"
- !Wait 2s
# Cleanup
- !Command
command: mv rustic-tmp-save.toml ~/.config/rustic/rustic.toml
hidden: true
- !Command
command: rm src/testfile
hidden: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB