borg-copy(1)

Name
borg-copy - Copy an archive to a new archive name.

SYNOPSIS

borg [common options] copy [options] OLDNAME NEWNAME

DESCRIPTION

This command copies an existing archive to a new archive with a different name, keeping the existing archive.

Afterwards, the repository has two archives with the same contents, but with different names and different archive IDs. The copy is an independent archive: deleting either of the two archives keeps the other one intact, because borg compact only frees chunks that no remaining archive references.

Copying is cheap and fast: no file content is read or written, only a new archive metadata object is created. Like any deduplicated archives, the two archives share their data, so a copy needs almost no additional repository space.

Because archive names do not need to be unique, NEWNAME may also be the name of some other already existing archive - the copy then just becomes another archive of that archive series.

NEWNAME must be different from the name of the archive that is copied, though: the copy would get identical metadata and thus the same archive ID as its source, so no second archive could be created.

OLDNAME must match precisely one archive: give an archive name (if it is unique) or an archive ID, like aid:d34db33f.

Note: to copy archives into a different repository, use borg transfer.

OPTIONS

See borg-common(1) for common options of Borg commands.

  arguments

OLDNAME
    specify the existing archive name or ID

NEWNAME
    specify the new archive name

EXAMPLES

    # create an archive, then keep a copy of it under a stable name:
    $ borg create backup-2016-02-15 ~
    $ borg copy backup-2016-02-15 known-good
    $ borg repo-list
    d7b79fd3  Sat, 2026-08-29 14:39:27 +0200  backup-2016-02-15              tw          MacBook-Pro
    f81040e3  Sat, 2026-08-29 14:39:27 +0200  known-good                   tw          MacBook-Pro
    # the copy is an independent archive:
    # after deleting (and compacting away) the original, the copy is still complete.
    $ borg delete backup-2016-02-15
    $ borg compact
    $ borg extract known-good
    # if the archive name is not unique, address the archive by its ID:
    $ borg copy aid:d7b79fd3 known-good

SEE ALSO

borg-common(1)

Author
The Borg Collective