mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 04:30:13 -08:00
refactor: Improve backup-env-files.sh for temp file handling and enhance crontab entries for .env backups
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user