Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhubbardsf/zsh-backup
Backup for my zsh files, run daily at midnight
https://github.com/jhubbardsf/zsh-backup
Last synced: 15 days ago
JSON representation
Backup for my zsh files, run daily at midnight
- Host: GitHub
- URL: https://github.com/jhubbardsf/zsh-backup
- Owner: jhubbardsf
- Created: 2019-10-31T01:23:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-31T01:23:48.000Z (over 5 years ago)
- Last Synced: 2024-05-01T13:06:43.225Z (10 months ago)
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ZSHFiles
This is my backup for all my Zsh files.
create ~/backups/
Clone this into ~/backups
Use the ~/backups/zsh/restore-zsh.sh script to copy all this to your home directory for use.
Note that this will just copy my zsh files and completely erase yours, so be careful!!! If you want to do your own backups look before.
## If you just want to backup your own
If you just want to use the backup/restore scripts. Just copy the backup and restore scripts those to your ~/backups/zsh/ directory and then:git init .
git add .
git commit -am "Initial commit"
hub create --private
git push --set-upstream origin master
sudo chmod +x backup-zsh.sh
sudo chmod +x restore-zsh.sh
./backup-zsh.sh
And your backups should be in your private git repo.
## Run everyday at midnight (only if doing your own backup and not using mine)
If you want it to run everyday at midnight, add it to your crontabenv EDITOR=vim crontab -e
Then paste
0 0 * * * /Users//backups/zsh/backup-zsh.sh
Note: On some systems there needs to be a blank line at the end of your crontab to work. Not sure where that bug came from or if it's been fixed. But I usually add one just incase.