borg-copy(1)

πŸ“¦ version 2.0.0b25, in ubuntu stonking

πŸ’– 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