Guest User

Untitled

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