recreate.rst 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. .. include:: recreate.rst.inc
  2. Examples
  3. ~~~~~~~~
  4. ::
  5. # Make old (Attic / Borg 0.xx) archives deduplicate with Borg 1.x archives.
  6. # Archives created with Borg 1.1+ and the default chunker params are skipped
  7. # (archive ID stays the same).
  8. $ borg recreate /mnt/backup --chunker-params default --progress
  9. # Create a backup with little but fast compression
  10. $ borg create /mnt/backup::archive /some/files --compression lz4
  11. # Then compress it - this might take longer, but the backup has already completed,
  12. # so no inconsistencies from a long-running backup job.
  13. $ borg recreate /mnt/backup::archive --recompress --compression zlib,9
  14. # Remove unwanted files from all archives in a repository.
  15. # Note the relative path for the --exclude option - archives only contain relative paths.
  16. $ borg recreate /mnt/backup --exclude home/icke/Pictures/drunk_photos
  17. # Change archive comment
  18. $ borg create --comment "This is a comment" /mnt/backup::archivename ~
  19. $ borg info /mnt/backup::archivename
  20. Name: archivename
  21. Fingerprint: ...
  22. Comment: This is a comment
  23. ...
  24. $ borg recreate --comment "This is a better comment" /mnt/backup::archivename
  25. $ borg info /mnt/backup::archivename
  26. Name: archivename
  27. Fingerprint: ...
  28. Comment: This is a better comment
  29. ...