borg-copy(1)
π borg-copy β NAME π
okay bestie, welcome to borg-copy β the Borg command that copies an archive to a whole new archive name. yes, a copy. iconic behaviour honestly. π
π¦ SYNOPSIS π¦
borg [common options] copy [options] OLDNAME NEWNAME
β¨ DESCRIPTION β¨
so here's the tea: this command takes an archive you already have and copies it to a new archive with a different name, and it keeps the existing archive too. no deleting, no replacing, just a whole second archive. slay. π
after you run it, the repository has two archives with the same contents, but with different names and different archive IDs. and the plot twist? the copy is a fully independent archive β deleting either of the two archives keeps the other one totally intact, because borg compact only frees chunks that no remaining archive references. no cap. π―
copying is cheap and fast: no file content is read or written, only a new archive metadata object gets created. and like any deduplicated archives, the two of them share their data, so a copy needs almost no additional repository space. it's giving efficient. β¨
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. no drama, just vibes.
π¨ BUT. NEWNAME must be different from the name of the archive that is copied. why? because the copy would get identical metadata and thus the same archive ID as its source, so no second archive could be created. so yeah, pick a different name, bestie. periodt.
OLDNAME must match precisely one archive: give it an archive name (if it's unique) or an archive ID, like aid:d34db33f. π«Ά
π‘ Note: if you wanna copy archives into a different repository, use borg transfer instead. different tool, different vibe. iykyk.
π OPTIONS π
see borg-common(1) for common options of Borg commands. (yes, borg-common(1), go read it, it's got the shared stuff π)
πΈ 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
look at those two archive IDs up there β same contents, different names, both thriving. ππ₯
π SEE ALSO π
π§ Author π§
The Borg Collective
and that's the whole page, bestie!! πβ¨ this fine piece of documentation is from 2026-10-07, brought to you by borg-copy(1) in the borg backup tool β go forth and copy responsibly, mwah ππ¦π
π¦ where this page comes from
- ubuntu stonking: borgbackup2 2.0.0b25-4 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms