Backity is a web service for automatically downloading backups of your games from external clients such as GOG.
For instructions on how to use Backity, consult the Wiki.
The information below is aimed at developers who want to extend this project's functionality.
First, clone this repository.
Then, build it locally with:
mvn clean install
You can run the project with the following command:
cd backend
mvn spring-boot:run
As a result, you should be able to visit the home page on http://localhost:8080/:
To customize the application, use the -Dspring-boot.run.arguments
flag to pass custom property values, e.g.:
cd backend
mvn spring-boot:run -Dspring-boot.run.arguments="--some-property-1=value1 --some-property-2=value2"
The following basic properties can be customized:
backity.default-path-template
- the template to use when constructing the file download path (e.g.,games/{GAME_PROVIDER_ID}/{TITLE}/{FILENAME}
). Available placeholders:{GAME_PROVIDER_ID}
- the ID of the game provider, e.g., "GOG"{TITLE}
- the game title{FILENAME}
- the full name of the file being downloaded
The following advanced properties can be customized:
backity.file-download-queue-scheduler
- how often the file download queue should be checkedbackity.gog-auth-scheduler
- how often the system should check if GOG authentication should be refreshed
By default, Backity uses the local file system to store files.
To enable S3 support, backity.filesystem.s3.enabled
must be set to true
.
Further properties should also be configured:
backity.filesystem.s3.bucket
- the bucket to use for storing game filesspring.cloud.aws.s3.endpoint
- the S3 endpointspring.cloud.aws.s3.region.static
- the S3 regionspring.cloud.aws.credentials.access-key
- optionally, the access keyspring.cloud.aws.credentials.secret-key
- optionally, the secret key
Check the Spring Cloud AWS documentation for more advanced configuration options.
The following optional properties are also available:
backity.filesystem.s3.buffer-size-in-bytes
- the buffer size for multipart uploads (see: AWS S3 multipart upload limits)
The following information is useful to know about the application's functionality:
- If downloading a file would result in overwriting an existing file, an exception will be thrown. This helps to protect the existing file and prevents multiple Game File aggregates from pointing to the same physical file.