| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 | .\" Man page generated from reStructuredText....nr rst2man-indent-level 0..de1 rstReportMargin\\$1 \\n[an-margin]level \\n[rst2man-indent-level]level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]-\\n[rst2man-indent0]\\n[rst2man-indent1]\\n[rst2man-indent2]...de1 INDENT.\" .rstReportMargin pre:. RS \\$1. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]. nr rst2man-indent-level +1.\" .rstReportMargin post:...de UNINDENT. RE.\" indent \\n[an-margin].\" old: \\n[rst2man-indent\\n[rst2man-indent-level]].nr rst2man-indent-level -1.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]].in \\n[rst2man-indent\\n[rst2man-indent-level]]u...TH "BORG-WITH-LOCK" 1 "2024-11-16" "" "borg backup tool".SH NAMEborg-with-lock \- run a user specified command with the repository lock held.SH SYNOPSIS.spborg [common options] with\-lock [options] COMMAND [ARGS...].SH DESCRIPTION.spThis command runs a user\-specified command while locking the repository. For example:.INDENT 0.0.INDENT 3.5.sp.nf.ft C$ BORG_REPO=/mnt/borgrepo borg with\-lock rsync \-av /mnt/borgrepo /somewhere/else/borgrepo.ft P.fi.UNINDENT.UNINDENT.spIt will first try to acquire the lock (make sure that no other operation isrunning in the repo), then execute the given command as a subprocess and waitfor its termination, release the lock and return the user command\(aqs returncode as borg\(aqs return code..sp\fBNOTE:\fP.INDENT 0.0.INDENT 3.5If you copy a repository with the lock held, the lock will be present inthe copy. Thus, before using borg on the copy from a different host,you need to use \(dqborg break\-lock\(dq on the copied repository, becauseBorg is cautious and does not automatically remove stale locks made by a different host..UNINDENT.UNINDENT.SH OPTIONS.spSee \fIborg\-common(1)\fP for common options of Borg commands..SS arguments.INDENT 0.0.TP.B COMMANDcommand to run.TP.B ARGScommand arguments.UNINDENT.SH SEE ALSO.sp\fIborg\-common(1)\fP.SH AUTHORThe Borg Collective.\" Generated by docutils manpage writer..
 |