- #!/bin/bash
- # Backup script meant for backing up stuff that is not managed by $env
- # Usage: bash backup.sh /path/to/target/
- # Requires: root privileges
- # Requires: deployment of environment
- # Set backup location here
- target=$1
- timestamp=$(date +%F_%T%z)
- # Make a timestamped directory there.
- mkdir -v "$target"homeprofile_backup_"$timestamp"
- # Make what has been bade by mkdir and put that into a variable called $tdir.
- tdir="$target"homeprofile_backup_"$timestamp"/
- # rsync -avpPhR = rsync --archive --verbose --perms --partial --progress --human-readable --relative
- # Backup Chromium profile
- rsync -avpPhR ~/.config/chromium "$tdir"
- # Backup weechat stuff
- rsync -avpPhR ~/.weechat "$tdir"
- # Backup SSH stuff
- rsync -avpPhR ~/.ssh /etc/ssh "$tdir"
Untitled
Posted by Anonymous on Tue 3rd Mar 2015 01:51
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.