From 9f778efdeeb419b79ab650b5af5bc4730c57d545 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Fri, 19 Jan 2024 12:32:06 -0500 Subject: [PATCH] snapshot (#438) --- docs/guides/drives/zrok_copy.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/guides/drives/zrok_copy.md b/docs/guides/drives/zrok_copy.md index 4872f973..266325df 100644 --- a/docs/guides/drives/zrok_copy.md +++ b/docs/guides/drives/zrok_copy.md @@ -1,3 +1,30 @@ # The zrok Drives CLI -The zrok Drives CLI tools allow for simple, ergonomic management and synchronization of local and remote file objects transparently. \ No newline at end of file +The zrok Drives CLI tools allow for simple, ergonomic management and synchronization of local and remote file objects transparently. + +## Sharing a Drive + +Virtual drives are shared through the `zrok` CLI using the `--backend-mode drive` flag with the `zrok share` command, using either the `public` or `private` sharing modes: + +``` +$ mkdir /tmp/junk +$ zrok share private --headless --backend-mode drive /tmp/junk +[ 0.124] INFO sdk-golang/ziti.(*listenerManager).createSessionWithBackoff: {session token=[cf640aac-2706-49ae-9cc9-9a497d67d9c5]} new service session +[ 0.145] INFO main.(*sharePrivateCommand).run: allow other to access your share with the following command: +zrok access private wkcfb58vj51l +``` + +The command shown above creates an ephemeral `zrok` drive share pointed at the local `/tmp/junk` folder. + +Notice that the share token allocated by `zrok` is `wkcfb58vj51l`. We'll use that share token to identify our virtual drive in the following operations. + +## Working with the Drive Share + +First, let's copy a file into our virtual drive using the `zrok copy` command: + +``` +$ zrok copy LICENSE zrok://wkcfb58vj51l +[ 0.119] INFO zrok/drives/sync.OneWay: => /LICENSE +copy complete! +``` +