Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- mkfs.ext4 /dev/sda1
- mount /dev/sda1 /mnt/backup
- #rsync -aAXvHS --numeric-ids --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /mnt/backup/
- tar -czvf /mnt/backup/back`date +%Y-%m-%d`.tar.gz / --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/tmp --exclude=/run --exclude=/mnt --exclude=/media --exclude=/lost+found
- umount /mnt/backup
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement