Skip to content

Instantly share code, notes, and snippets.

@cjadeveloper
Last active June 19, 2021 13:19
Show Gist options
  • Save cjadeveloper/df32d4d698792c158fe482495f606be8 to your computer and use it in GitHub Desktop.
Save cjadeveloper/df32d4d698792c158fe482495f606be8 to your computer and use it in GitHub Desktop.
script para backup con rdiff-backup en fish shell
#!/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