transfer.rst 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. .. include:: transfer.rst.inc
  2. Examples
  3. ~~~~~~~~
  4. ::
  5. # 0. Have Borg 2.0 installed on the client AND server; have a b12 repository copy for testing.
  6. # 1. Create a new "related" repository:
  7. # Here, the existing Borg 1.2 repository used repokey-blake2 (and AES-CTR mode),
  8. # thus we use repokey-blake2-aes-ocb for the new Borg 2.0 repository.
  9. # Staying with the same chunk ID algorithm (BLAKE2) and with the same
  10. # key material (via --other-repo <oldrepo>) will make deduplication work
  11. # between old archives (copied with borg transfer) and future ones.
  12. # The AEAD cipher does not matter (everything must be re-encrypted and
  13. # re-authenticated anyway); you could also choose repokey-blake2-chacha20-poly1305.
  14. # In case your old Borg repository did not use BLAKE2, just remove the "-blake2".
  15. $ borg --repo ssh://borg2@borgbackup/./tests/b20 repo-create \
  16. --other-repo ssh://borg2@borgbackup/./tests/b12 -e repokey-blake2-aes-ocb
  17. # 2. Check what and how much it would transfer:
  18. $ borg --repo ssh://borg2@borgbackup/./tests/b20 transfer --upgrader=From12To20 \
  19. --other-repo ssh://borg2@borgbackup/./tests/b12 --dry-run
  20. # 3. Transfer (copy) archives from the old repository into the new repository (takes time and space!):
  21. $ borg --repo ssh://borg2@borgbackup/./tests/b20 transfer --upgrader=From12To20 \
  22. --other-repo ssh://borg2@borgbackup/./tests/b12
  23. # 4. Check whether we have everything (same as step 2):
  24. $ borg --repo ssh://borg2@borgbackup/./tests/b20 transfer --upgrader=From12To20 \
  25. --other-repo ssh://borg2@borgbackup/./tests/b12 --dry-run