Last active
June 19, 2021 13:19
-
-
Save cjadeveloper/df32d4d698792c158fe482495f606be8 to your computer and use it in GitHub Desktop.
script para backup con rdiff-backup en fish shell
This file contains 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 fish | |
set DBG 4 | |
set DIRMOUNT /media/data/backup | |
if ! test -d $DIRMOUNT/$PWD | |
mkdir -p "$DIRMOUNT/$PWD" | |
end | |
rdiff-backup -v$DBG --print-statistics --force --exclude $PWD/.cache \ | |
--exclude $PWD/.local/share --exclude $PWD/Dropbox --exclude $PWD/.pyenv \ | |
--exclude $PWD/.poetry --exclude $PWD/.nvm --exclude $PWD/code/'**'/.venv \ | |
--exclude $PWD/code/'**'/node_modules --exclude $PWD/Descargas \ | |
--exclude $PWD/Documentos $PWD/ $DIRMOUNT/$PWD/ | |
rdiff-backup -v$DBG --print-statistics --remove-older-than 3W $DIRMOUNT/$PWD/ | |
rdiff-backup -l $DIRMOUNT/$PWD/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment