layout a backupbot (drone-like) interface #20

Closed
opened 2023-08-26 09:15:50 +00:00 by yksflip · 1 comment
Owner

this is my first interface proposal.
At the moment we use restics --host key for the actual host, but I think it could be more useful to actually identify the service with it.

commands

create

  1. runs pre commands
  2. restic backup --host $SERVICE
  3. runs post commands
docker exec\
  -e SERVICE=cloud.example.org\
  backupbot create

Restore

  1. restic restore --host $SERVICE $SNAPSHOT
  2. exec restore label command
docker exec\
  -e SERVICE=cloud.example.org\
  -e SNAPSHOT=latest\
  backupbot restore

Download

  1. restic dump --host $SERVICE $SNAPSHOT
  2. docker cp
docker exec\
  -e SERVICE=cloud.example.org
  -e SNAPSHOT=latest\
  backupbot download

Snaphots

Displays a list of all snapshots

  1. restic snaphots -H $SERVICE
docker exec\
  -e SERVICE=cloud.example.org
  backupbot snapshots

List

Displays a list of available backups.

  1. restic ls $SNAPSHOT
docker exec\
  -e SNAPSHOT=latest
  backupbot ls
this is my first interface proposal. At the moment we use restics --host key for the actual host, but I think it could be more useful to actually identify the service with it. ### commands #### create 1. runs pre commands 2. `restic backup --host $SERVICE` 3. runs post commands ``` docker exec\ -e SERVICE=cloud.example.org\ backupbot create ``` #### Restore 1. `restic restore --host $SERVICE $SNAPSHOT` 2. exec restore label command ``` docker exec\ -e SERVICE=cloud.example.org\ -e SNAPSHOT=latest\ backupbot restore ``` #### Download 1. `restic dump --host $SERVICE $SNAPSHOT` 2. `docker cp` ``` docker exec\ -e SERVICE=cloud.example.org -e SNAPSHOT=latest\ backupbot download ``` #### Snaphots Displays a list of all snapshots 1. `restic snaphots -H $SERVICE` ``` docker exec\ -e SERVICE=cloud.example.org backupbot snapshots ``` #### List Displays a list of available backups. 1. `restic ls $SNAPSHOT` ``` docker exec\ -e SNAPSHOT=latest backupbot ls ```
yksflip added this to the (deleted) project 2023-08-26 09:16:04 +00:00
yksflip modified the project from (deleted) to backupbot revolution 2023-08-26 09:23:33 +00:00
Member

I changed the layout of #23 a little bit.
Please review:

commands

create

  1. runs pre commands
  2. restic backup --host $SERVICE
  3. runs post commands

backup --host cloud.example.org create --repo /example/repo
--host and --repo are optional

docker exec\
  -e SERVICE=cloud.example.org\
  -e RESTIC_REPO=/example/repo
  backup create

Restore

  1. restic restore --host $SERVICE $SNAPSHOT
  2. exec restore label command (not yet implemented)

backup --host cloud.example.org restore --snapshot <snapshot_id> --target <target_path>
--snapshot and --target are optional

docker exec\
  -e SERVICE=cloud.example.org\
  -e SNAPSHOT=<snapshot_id>
  -e TARGET=<target_path
  backup restore

Download

  1. restic dump $SNAPSHOT $INCLUDE_PATH > /tmp/$INCLUDE_PATH.tar
  2. docker cp

backup download --snapshot <snapshot_id> --path <download_path>
--snapshot is optional

docker exec\
  -e SNAPSHOT=<snapshot_id>
  -e INCLUDE_PATH=<download_path>
  backup download

It returns the filepath where the dump is saved. This dump can be copied with abra app cp.

Snaphots

Displays a list of all snapshots

  1. restic snaphots -H $SERVICE

backup --host cloud.example.org snapshots
--host is optional

docker exec\
  -e SERVICE=cloud.example.org
  backup snapshots

List

Displays a list of available backups.

  1. restic ls $SNAPSHOT

backup ls --snapshot <snapshot_id> --path <target_path>
--snapshot and --path are optional

docker exec\
  -e SNAPSHOT=latest
  -e INCLUDE_PATH=<target_path>
  backup ls
I changed the layout of https://git.coopcloud.tech/coop-cloud/backup-bot-two/pulls/23 a little bit. Please review: ### commands #### create 1. runs pre commands 2. `restic backup --host $SERVICE` 3. runs post commands `backup --host cloud.example.org create --repo /example/repo` `--host` and `--repo` are optional ``` docker exec\ -e SERVICE=cloud.example.org\ -e RESTIC_REPO=/example/repo backup create ``` #### Restore 1. `restic restore --host $SERVICE $SNAPSHOT` 2. exec restore label command (not yet implemented) `backup --host cloud.example.org restore --snapshot <snapshot_id> --target <target_path>` `--snapshot` and `--target` are optional ``` docker exec\ -e SERVICE=cloud.example.org\ -e SNAPSHOT=<snapshot_id> -e TARGET=<target_path backup restore ``` #### Download 1. `restic dump $SNAPSHOT $INCLUDE_PATH > /tmp/$INCLUDE_PATH.tar` 2. `docker cp` `backup download --snapshot <snapshot_id> --path <download_path>` `--snapshot` is optional ``` docker exec\ -e SNAPSHOT=<snapshot_id> -e INCLUDE_PATH=<download_path> backup download ``` It returns the filepath where the dump is saved. This dump can be copied with `abra app cp`. #### Snaphots Displays a list of all snapshots 1. `restic snaphots -H $SERVICE` `backup --host cloud.example.org snapshots ` `--host` is optional ``` docker exec\ -e SERVICE=cloud.example.org backup snapshots ``` #### List Displays a list of available backups. 1. `restic ls $SNAPSHOT` `backup ls --snapshot <snapshot_id> --path <target_path>` `--snapshot` and `--path` are optional ``` docker exec\ -e SNAPSHOT=latest -e INCLUDE_PATH=<target_path> backup ls ```
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/backup-bot-two#20
No description provided.