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:

{"message_type":"summary","files_new":5,"files_changed":45,"files_unmodified":7556,"dirs_new":0,"dirs_changed":59,"dirs_unmodified":6176,"data_blobs":40,"tree_blobs":56,"data_added":372556182,"total_files_processed":7606,"total_bytes_processed":614143997,"total_duration":28.584814703,"snapshot_id":"e9be53ec"}

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?

Best,
Ten

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.