Simple server to upload backup files
  • Rust 93.7%
  • Dockerfile 6.3%
Find a file
2026-04-06 18:40:33 +02:00
src Splitting in multiple files; improved README 2026-04-06 18:40:33 +02:00
.dockerignore Adding docker support 2026-04-06 00:48:40 +02:00
.env.example Now using .env 2026-04-05 23:58:31 +02:00
.gitignore Adding docker support 2026-04-06 00:48:40 +02:00
Cargo.lock Now using .env 2026-04-05 23:58:31 +02:00
Cargo.toml Now using .env 2026-04-05 23:58:31 +02:00
docker-compose.yaml Adding docker support 2026-04-06 00:48:40 +02:00
Dockerfile Adding docker support 2026-04-06 00:48:40 +02:00
LICENSE Create LICENSE 2026-04-06 01:03:32 +02:00
README.md Splitting in multiple files; improved README 2026-04-06 18:40:33 +02:00

Backup upload server

This is a simple server with an endpoint to upload backup files. It is secured with a token.

Note: the base of the source code was AI-generated.

Run

Create .env:

cp .env.example .env

Then edit the .env file.

Development

cargo run

Production

First, create the volume folder and chown it:

mkdir volume
chown 10001:10001 volume/

Then, run with docker:

docker compose up -d

Endpoints

/upload
/health

Examples

curl http://localhost:8080/health
curl \
    -X POST \
    -H "Authorization: your-secret-token" \
    -F "file=@filename.ext" \
    http://localhost:8080/upload

Limitations

For the moment, if you upload n files in the same second, with the same name, each will be overwritten by the next one. This is because only a time stamp (precise to the second) is prepended to the filename.

LICENSE

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.