Go to file
2024-06-13 22:53:25 +02:00
.gitignore Initial commit 2024-06-13 21:00:56 +02:00
kopia_backup.sh Added readme, logging and Repo password automation 2024-06-13 22:53:25 +02:00
README.md Added readme, logging and Repo password automation 2024-06-13 22:53:25 +02:00

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)