Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #By default home is backed up, but you can of course change it (You need read permissions or you will get errors)
- DATE=$(date +%d-%m-%Y)
- printf "Destination?: "
- read BPATH
- SOURCE=$HOME
- if [ ! -d $BPATH ];then
- printf "Path does not exist, aborting"
- else
- tar -cjpf $BPATH/backup-$DATE.tar.bz2 $SOURCE
- printf "Done"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement