Canasta includes integration with restic for automated backups to AWS S3-compatible storage.
Add these environment variables to your .env file:
AWS_S3_API=s3.amazonaws.com
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_S3_BUCKET=your-bucket-name
RESTIC_PASSWORD=your-restic-password
Initialize the restic repository:
sudo canasta restic init -i mywiki
These flags apply to all restic subcommands:
| Flag | Short | Default | Description |
|---|---|---|---|
--id |
-i |
Canasta instance ID | |
--path |
-p |
Current directory | Path to the Canasta installation |
--verbose |
-v |
false |
Verbose output |
Initialize a restic repository in the configured S3 bucket.
Usage:
canasta restic init [flags]
Example:
sudo canasta restic init -i mywiki
Create a new backup snapshot.
Usage:
canasta restic take-snapshot [flags]
Flags:
| Flag | Short | Description |
|---|---|---|
--tag |
-t |
Tag for the snapshot (required) |
Example:
sudo canasta restic take-snapshot -t "daily-backup" -i mywiki
View all available snapshots.
Usage:
canasta restic view [flags]
Example:
sudo canasta restic view -i mywiki
Restore from a snapshot.
Usage:
canasta restic restore [flags]
Flags:
| Flag | Short | Description |
|---|---|---|
--snapshot-id |
-s |
Snapshot ID to restore (required) |
--skip-before-restore-snapshot |
-r |
Skip taking a backup before restoring |
Example:
sudo canasta restic restore -s abc123def -i mywiki
By default, a backup snapshot is taken before restoring. Use -r to skip this.
List files in a snapshot.
Usage:
canasta restic list [flags]
Flags:
| Flag | Short | Description |
|---|---|---|
--tag |
-t |
Snapshot ID (required) |
Example:
sudo canasta restic list -t abc123def -i mywiki
Remove a snapshot from the repository.
Usage:
canasta restic forget [flags]
Flags:
| Flag | Short | Description |
|---|---|---|
--tag |
-t |
Snapshot ID to forget (required) |
Example:
sudo canasta restic forget -t abc123def -i mywiki
Show differences between two snapshots.
Usage:
canasta restic diff [flags]
Flags:
| Flag | Description |
|---|---|
--tag1 |
First snapshot ID (required) |
--tag2 |
Second snapshot ID (required) |
Example:
sudo canasta restic diff --tag1 abc123 --tag2 def456 -i mywiki
Check the integrity of the restic repository.
Usage:
canasta restic check [flags]
Example:
sudo canasta restic check -i mywiki
Remove locks created by other restic processes.
Usage:
canasta restic unlock [flags]
Example:
sudo canasta restic unlock -i mywiki