File: recreate.rst

package info (click to toggle)
borgbackup 1.1.9-2%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 11,956 kB
  • sloc: ansic: 39,466; python: 21,922; pascal: 2,269; sh: 137; makefile: 128
file content (34 lines) | stat: -rw-r--r-- 1,336 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.. include:: recreate.rst.inc

Examples
~~~~~~~~
::

    # Make old (Attic / Borg 0.xx) archives deduplicate with Borg 1.x archives.
    # Archives created with Borg 1.1+ and the default chunker params are skipped
    # (archive ID stays the same).
    $ borg recreate /mnt/backup --chunker-params default --progress

    # Create a backup with little but fast compression
    $ borg create /mnt/backup::archive /some/files --compression lz4
    # Then compress it - this might take longer, but the backup has already completed,
    # so no inconsistencies from a long-running backup job.
    $ borg recreate /mnt/backup::archive --recompress --compression zlib,9

    # Remove unwanted files from all archives in a repository.
    # Note the relative path for the --exclude option - archives only contain relative paths.
    $ borg recreate /mnt/backup --exclude home/icke/Pictures/drunk_photos

    # Change archive comment
    $ borg create --comment "This is a comment" /mnt/backup::archivename ~
    $ borg info /mnt/backup::archivename
    Name: archivename
    Fingerprint: ...
    Comment: This is a comment
    ...
    $ borg recreate --comment "This is a better comment" /mnt/backup::archivename
    $ borg info /mnt/backup::archivename
    Name: archivename
    Fingerprint: ...
    Comment: This is a better comment
    ...