Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Eraiyanbupeterfrancis/AutoBackupTool/llms.txt

Use this file to discover all available pages before exploring further.

encrypt.py is a minimal script that prints a new Fernet symmetric encryption key to stdout. Run it once before your first backup to generate the key you’ll store in backup.env.

Source

encrypt.py
from cryptography.fernet import Fernet
print(Fernet.generate_key().decode())

Usage

python encrypt.py
The output is a base64-encoded string approximately 44 characters long:
gAAAAAB...base64encodedkey...
Copy the entire output and paste it as the value of ENCRYPTION_KEY in your backup.env:
backup.env
ENCRYPTION_KEY=gAAAAAB...base64encodedkey...
CLIENT_SECRETS_FILE=client_secrets.json

Key properties

  • Generated by Fernet.generate_key() from the cryptography library
  • 32 cryptographically random bytes, URL-safe base64-encoded
  • Each call produces a unique key — there is no way to regenerate the same key
  • Used for both encryption (backup) and decryption (restore) — the same key must be present in backup.env for both operations
Run this script once and store the output in a password manager or secure note. If you run it again, you get a different key and will be unable to decrypt backups made with the original key.
The key is printed as a plain string with no surrounding quotes. Copy it exactly — including any trailing characters — and paste it directly after ENCRYPTION_KEY= in backup.env.

Build docs developers (and LLMs) love