refactor: Improve backup-env-files.sh for temp file handling and enhance crontab entries for .env backups

This commit is contained in:
Peter Wood
2025-05-29 07:19:12 -04:00
parent 20737f7872
commit faf5102cd7
6 changed files with 99 additions and 40 deletions

View File

@@ -207,6 +207,7 @@ The system automatically finds:
### Common Issues
1. **Git Push Fails**
```bash
# Check remote URL
cd ~/.env-backup && git remote -v
@@ -216,6 +217,7 @@ The system automatically finds:
```
2. **Missing Files**
```bash
# List what would be found
./backup-env-files.sh --list
@@ -279,12 +281,14 @@ git status --porcelain
### Additional Security Measures
1. **GPG Encryption** (Optional)
```bash
# Encrypt sensitive files before committing
gpg --symmetric --cipher-algo AES256 file.env
```
2. **Restricted Permissions**
```bash
# Secure backup directory
chmod 700 ~/.env-backup
@@ -292,6 +296,7 @@ git status --porcelain
```
3. **Audit Trail**
```bash
# Monitor repository access
git log --oneline --graph --all