Rest-server - manually post files

hey there,

first of all: awesome tool! really love using restic for all-day backup purposed, also the community around restic is a pleasure!

Until now iam using a SMB-Share as a restic-backend to store my backups:

/usr/local/bin/restic backup --json --tag ${TAG} /Users | tail -n1  | tee ${LOCALDIR}/${HOST}/lastbackup.log

This way iam able to fetch the summary from the json output and store it on the smb-share and parse it afterwards (grafana). Example:


For testing purpose, i installed the rest-server as a restic-backend, which worked like expected! Iam running the rest-server with those settings:

/usr/local/bin/rest-server --path /srv/rest-server --no-auth --tls-cert /srv/rest-certs/rest-server.crt --tls-key /srv/rest-certs/rest-server.key --tls --listen :443 --append-only

I would like to store the json-output locally and put the output manually to the rest-server. Is there any way to accomplish this?


I don’t understand that you’re asking.

What output do you want to save? I am presuming the JSON output from your restic run.

But what do you mean by putting that output to the rest-server? The rest-server is for storing your restic repository, not for storing your JSON logs from restic runs.

Please clarify.

If it’s any help, here’s the reference for the REST API used by restic to communicate with rest-server: References — restic 0.12.1 documentation

Thats correct - i am piping the last line

restic backup --json /Users | tail -n1  | tee summary.log

which includes the summary of the backup to a file. I would like to also put this summary.log into the repository to have everything in one place. Is there a way?

Thanks for the Link, ill take a look.