borg/docs/usage.rst
Thomas Waldmann cf58f9a05a
copy: new command to copy an archive to a new archive name, #2300
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.

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.

Archive.copy() is Archive.rename() without removing the original archive
entry. Copying an archive to its own name is refused: the new metadata would
be identical, thus have the same archive ID, and no second archive would be
created. NEWNAME may well be the name of some other existing archive, the
copy then just joins that archive series.

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 06:30:19 +02:00

76 lines
1.8 KiB
ReStructuredText

.. include:: global.rst.inc
.. highlight:: none
.. _detailed_usage:
Usage
=====
.. raw:: html
Redirecting...
<script type="text/javascript">
// Fixes old links that were just anchor fragments
var hash = window.location.hash.substring(1);
// usage.html is empty; it contains no content. It purely serves to implement a "correct" toctree
// due to reST/Sphinx limitations. Refer to https://github.com/sphinx-doc/sphinx/pull/3622
// Redirect to general docs
if(hash == "") {
var replaced = window.location.pathname.replace("usage.html", "usage/general.html");
if (replaced != window.location.pathname) {
window.location.pathname = replaced;
}
}
// Fixup anchored links from when usage.html contained all the commands
else if(hash.startsWith("borg-key") || hash == "borg-change-passphrase") {
window.location.hash = "";
window.location.pathname = window.location.pathname.replace("usage.html", "usage/key.html");
}
else if(hash.startsWith("borg-")) {
window.location.hash = "";
window.location.pathname = window.location.pathname.replace("usage.html", "usage/") + hash.substr(5) + ".html";
}
</script>
.. toctree::
usage/general
usage/repo-create
usage/repo-space
usage/repo-list
usage/repo-info
usage/repo-compress
usage/repo-delete
usage/serve
usage/version
usage/compact
usage/lock
usage/key
usage/create
usage/extract
usage/check
usage/list
usage/find
usage/tag
usage/rename
usage/copy
usage/diff
usage/delete
usage/prune
usage/undelete
usage/info
usage/analyze
usage/mount
usage/webdav
usage/recreate
usage/tar
usage/transfer
usage/benchmark
usage/help
usage/completion
usage/debug
usage/notes