Last active
January 15, 2022 06:38
-
-
Save jeremysells/1eee29ee7870f0625a6d447e8d11c2e6 to your computer and use it in GitHub Desktop.
My backup commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "License: MIT please read https://opensource.org/licenses/MIT" | |
echo "" | |
sleep 5 | |
sudo bash -c "dd if=/dev/nvme0n1 | gzip > /media/name/hdd/hdd-disk.gz" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "License: MIT please read https://opensource.org/licenses/MIT" | |
echo "" | |
sleep 5 | |
rsync -aAXv \ | |
--exclude=/dev/* \ | |
--exclude=/proc/* \ | |
--exclude=/sys/* \ | |
--exclude=/tmp/* \ | |
--exclude=/run/* \ | |
--exclude=/mnt/* \ | |
--exclude=/media/* \ | |
--exclude=/var/lib/docker/* \ | |
--exclude="swapfile" \ | |
--exclude="lost+found" \ | |
--exclude=".xsession-errors" \ | |
/ \ | |
/media/name/hdd/some-dir/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment