restic / restic/rest-server

add pre+post-backup commands

Open
#200 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.5k
Forks
178
Avg merge
15d 9h
Merged PRs (30d)
2

Description

What should rest-server do differently?

add the ability to execute some commands just before and after the backup happens.

Example for doc:
--pre-backup-cmd execute a command/script just before the restic backup is executed (before any data are written)
--post-backup-cmd execute a command/script after the restic backup from remote is finished

What are you trying to do? What is your use case?

I would like to use rest-server for security-reasons. Mainly to avoid to get rid of the backups if a client is hacked. So i use the --append-only-command.

My old backup-scripts have done some preparing (i.E. creating statistics of usage before and after a backup, creating snapshots, creating index for a self-created http-restore-gui). This was executed by ssh on the restic-server.

In future i want to avoid ssh-access from client due to security reasons, but i need to execute my pre- and post-backupscripts.

I could write a own rest-server which does exaclty this, but i think i am not the only one who needs this and all of the infrastructure of restic-rest-server could be used (auth, encryption etc)

Did rest-server help you today? Did it make you happy in any way?

it made my happy just of beeing existent and i can solve my security-problems :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by locating the rest-server entry point that handles restic backup requests and the existing --append-only-command behavior. Clarify command configuration, execution timing, and failure and security expectations before implementing; done means documented pre- and post-backup hooks with tests for their behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.