Created
March 14, 2026 19:31
-
-
Save santiagosony/fccc15b880feaf4c89f22411b2e1e4d6 to your computer and use it in GitHub Desktop.
Linux backup folders to GCP Bucket
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Script generado por santiagosony | |
| filename=/tmp/backup-$(date '+%Y-%m-%d').7z | |
| 7z a $filename /etc/ /home/ /root/ /var/lib/homebridge/backups/instance-backups/ | |
| rclone -v --gcs-bucket-policy-only copy $filename gcs:<BUCKET_PATH>/$(date '+%Y')/ | |
| rm -v $filename | |
| logger -s "Backup etc files done to bucket" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment