install_and_basics.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # borgbackup - installation and basic usage
  2. # I have already downloaded the binary release from github:
  3. ls -l
  4. # binary file + GPG signature
  5. # verifying whether the binary is valid:
  6. gpg --verify borg-linux64.asc borg-linux64
  7. # install it as "borg":
  8. cp borg-linux64 ~/bin/borg
  9. # making it executable:
  10. chmod +x ~/bin/borg
  11. # yay, installation done! let's make backups!
  12. # creating a repository:
  13. borg init repo
  14. # creating our first backup with stuff from "data" directory:
  15. borg create --stats --progress --compression lz4 repo::backup1 data
  16. # changing the data slightly:
  17. echo "some more data" > data/one_file_more
  18. # creating another backup:
  19. borg create --stats --progress repo::backup2 data
  20. # that was much faster! it recognized/deduplicated unchanged files.
  21. # see the "Deduplicated size" column for "This archive"! :)
  22. # extracting a backup archive:
  23. mv data data.orig
  24. borg extract repo::backup2
  25. # checking if restored data differs from original data:
  26. diff -r data.orig data
  27. # no, it doesn't! :)
  28. # listing the repo contents:
  29. borg list repo
  30. # listing the backup2 archive contents (shortened):
  31. borg list repo::backup2 | tail
  32. # easy, isn't it?
  33. # if you like #borgbackup, spread the word!