Advertisement
Guest User

borg_my_home.sh

a guest
Aug 26th, 2017
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.03 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # initialize the repo with the command:
  4. #   borg init /mnt/C1/borg_backups/ja_borg
  5. # then run this script
  6.  
  7. REPOSITORY=/mnt/C1/borg_backups/ja_borg
  8.  
  9. borg create --progress --verbose --stats --compression lz4      \
  10.     $REPOSITORY::`date +%Y-%m-%d`                               \
  11.     /home/ja/                                                   \
  12.     --exclude /home/*/.cache                                    \
  13.     --exclude /home/*/.thumbnails                               \
  14.     --exclude /home/*/Downloads/                                \
  15.     --exclude /home/*/VirtualBox/                               \
  16.     --exclude /home/*/.local/share/Trash                        \
  17.  
  18. # borg prune -v $REPOSITORY \
  19.     # --keep-daily=1 --keep-weekly=1 --keep-monthly=1
  20.  
  21. # --- USEFULL SHIT ---
  22.  
  23. # go in to repo folder, to list available backups:
  24. #   borg list .
  25. # to mount one of them:
  26. #   borg mount .::2016-04-25 ~/temp
  27. # to umount:
  28. #   borg umount ~/temp
  29. # to delete single backup in a repo:
  30. #   borg delete .::2016-04-25
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement