Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if
- mkdir /tmp/remote-folder
- mount -t cifs -o username=“user”,password=“pass” //server/“backups-folder” /tmp/remote-folder
- then
- name=$(date '+%y-%m-%d')
- tar -czf - ~/ --exclude=/home/user/"folderwithhugedata" | pv > /tmp/remote-folder/$name-backup.tgz
- umount /tmp/remote-folder
- rm -rf /tmp/remote-folder
- echo 'That was smoothly nice ... you rock!'
- else
- echo 'Something´s f*ck´d here!'
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement