CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/compute/cloud-filesystem/help.tsx
Views: 687
1
import { Modal } from "antd";
2
import { A } from "@cocalc/frontend/components";
3
4
export function HelpModal({ open, setOpen }) {
5
return (
6
<Modal
7
width={700}
8
open={open}
9
onOk={() => setOpen(false)}
10
onCancel={() => setOpen(false)}
11
>
12
<HelpText />
13
</Modal>
14
);
15
}
16
17
export function HelpText() {
18
return (
19
<div>
20
<h2>Filesystem Commands</h2>
21
<p>
22
Type <code>cocalc -h</code> in a terminal running on a compute server to
23
see the options for working with Cloud File Systems. In most cases you
24
should run the <code>cocalc</code> command in a terminal from in a
25
directory in the cloud file system (similar to how git is aware of the
26
repo you are in).
27
</p>
28
<p>
29
The <code>cocalc warmup</code> command is especially important to know
30
about.
31
</p>
32
<ul style={{ marginTop: "15px" }}>
33
<li>
34
<strong>
35
<code>cocalc warmup </code>:
36
</strong>{" "}
37
Downloads chunks for the current working directory to the local disk
38
cache for much faster subsequent access. The disk cache (which is in
39
<code>/data/.cloud-filesystem/cache/</code>) uses up to 90% of your
40
disk and survives reboots but not deprovisioning. You may get much
41
better performance with a Cloud File System by enlarging a compute
42
server's disk (which is easy to do at any time), since then more of it
43
can be used for cache.
44
</li>
45
<li>
46
<strong>
47
<code>cocalc backup</code>:{" "}
48
</strong>
49
Create and manage incremental backups. Run this command with no
50
arguments from within the cloud file system to make a backup that is
51
stored inside of the cloud file system itself. You can also make
52
backups to other cloud file systems or directories.
53
</li>
54
<li>
55
<strong>
56
<code>cocalc sync &lt;source&gt; &lt;dest&gt;</code>:
57
</strong>{" "}
58
Efficiently sync files from a source directory to a dest directory.
59
This is similar to rsync but potentially much faster since it is aware
60
of how Cloud File Systems store data. It's also an efficient way to get
61
data into and out of your Cloud File System.
62
</li>
63
<li>
64
<strong>
65
<code>cocalc cloudfs stat</code>:
66
</strong>{" "}
67
Show realtime performance statistics of a Cloud File System. In
68
particular, you can see what objects are being uploaded or downloaded
69
to better understand network usage, and whether any data is not yet
70
uploaded before turning off a compute server.
71
</li>
72
</ul>
73
Cloud File Systems use <A href="https://juicefs.com/en/">JuiceFS</A> under
74
the hood, and there is also a{" "}
75
<A href="https://juicefs.com/docs/community/command_reference">
76
juicefs command
77
</A>{" "}
78
that you can explore.
79
</div>
80
);
81
}
82
83