kopia-backup/README.md
2024-06-13 23:14:37 +02:00

26 lines
1.1 KiB
Markdown

# Automatic backup script to use with Kopia and S3 compatible object storage
## Dependencies
- S3 compatible storage optional
- bash shell
- kopia (CLI)
- an internet connection
## Installation
1. Create a file called _kopia\_environment_
2. Set the following environment variables inside the new file:
- _BUCKET\_NAME_: Name of the bucket to use in your S3 compatible storage
- _ACCESS\_KEY_: Access key for your object storage
- _SECRET\_ACCESS\_KEY_: Secret key for the object storage
- _ENDPOINT_: API endpoint for the object storage
- _DIRS_: Directories to take snapshots of, space separated
- _LOGPATH_: Directory to store log files in
- _REPO\_PASSWORD_: Password to for the kopia repository
3. Create the kopia repository:
```
source kopia_environment &&
kopia repository create --access-key=$ACCESS_KEY --secret-access-key=$SECRET_ACCESS_KEY --ENDPOINT=$ENDPOINT -p $REPO_PASSWORD
```
4. Setup cronjob (optional)
## License
The project is licensed under the GPL v3.0 (or later). Please see LICENSE.md or [fsf.org](https://www.gnu.org/licenses/gpl-3.0.en.html)