You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64-29Lines changed: 64 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,52 +44,68 @@ See `config/config_example.yml` for example configuration file, available option
44
44
- To build from source, proceed with this manual.
45
45
46
46
### Foreground mode
47
-
*note: this is not recommended for production use, use systemd service instead*
47
+
> [!NOTE]
48
+
> this is not recommended for production use, use systemd service instead or run it in a Docker container
48
49
49
50
1. Clone the repository from GitHub
50
51
51
-
git clone https://github.com/parMaster/zoomrs.git
52
+
```sh
53
+
git clone https://github.com/parMaster/zoomrs.git
54
+
```
52
55
53
56
2. Make sure `config/config.yml` exists and is configured properly
54
57
3. Run `make run` to build the binary and run it in foreground mode
55
58
56
-
make run
59
+
```sh
60
+
make run
61
+
```
57
62
4. To stop the service press `Ctrl+C` (or send `SIGINT`, `SIGTERM` signal to the process)
58
63
59
64
### Systemd service
60
65
1. Repeat steps 1 and 2 from the previous section
61
66
2. Run `make deploy` to build the binary and copy everything where it belongs (see `Makefile` for details), enable and run the service
62
-
63
-
make deploy
67
+
```sh
68
+
make deploy
69
+
```
64
70
3. Run `make status` to check the status of the service
65
71
66
-
make status
72
+
```sh
73
+
make status
74
+
```
67
75
68
76
Log files are located at `/var/log/zoomrs.log` and `/var/log/zoomrs.err` by default.
69
77
70
78
### Docker container
71
79
1. Clone the repository from GitHub
72
80
73
-
git clone https://github.com/parMaster/zoomrs.git
81
+
```sh
82
+
git clone https://github.com/parMaster/zoomrs.git
83
+
```
74
84
75
85
2. Make sure `config/config.yml` exists and is configured properly
76
86
3. Check configuration parameters in Dockerfile and docker-compose.yml
77
87
4. Build and run container
78
88
79
-
docker compose up -d
89
+
```sh
90
+
docker compose up -d
91
+
```
80
92
81
93
## Usage
82
94
### Web frontend
83
95
Web frontend is available at `http://localhost:8099` by default. You can change the port in the configuration file (`server.listen` parameter).
84
96
85
97
### Web frontend Pages
86
98
87
-
#### GET `/`
99
+
```http
100
+
GET `/`
101
+
```
88
102
Displays the list of recordings. Each recording has a link to share (view) it. Recordings are sorted by date in descending order. Login is required to view the list. Google OAuth is used for authentication. Access is restricted to users with email addresses from the list specified in the configuration file (see `server.managers`).
89
103
90
104
Share button is available for each recording, it generates a link to view the recording. Share link looks like:
91
105
92
-
#### GET `/watch/834d0992ad0d632cf6c3174b975cb5e5?uuid=kzbiTyvQQp2fW6biu8Vy%2BQ%3D%3D`
106
+
```http
107
+
GET `/watch/834d0992ad0d632cf6c3174b975cb5e5?uuid=kzbiTyvQQp2fW6biu8Vy%2BQ%3D%3D`
108
+
```
93
109
Displays the page with the meeting title and player to watch the recording. Simple controls besides the embeded player is providing are available.
94
110
95
111
## API
@@ -210,17 +226,23 @@ Response when some meetings are not loaded:
210
226
Zoomrs comes with a CLI tool to trash/delete recordings from Zoom Cloud. It is useful when running miltiple servers and you want to delete recordings from Zoom Cloud only after all servers have downloaded them. CLI tool is located at `cmd/cli/main.go`. Run `make` to build it and put to `dist/zoomrs-cli`.
211
227
It can be run like this:
212
228
213
-
go run ./cmd/cli --cmd check
229
+
```sh
230
+
go run ./cmd/cli --cmd check
231
+
```
214
232
215
233
or like this:
216
234
217
-
./dist/zoomrs-cli --cmd check
235
+
```sh
236
+
./dist/zoomrs-cli --cmd check
237
+
```
218
238
219
239
Available commands:
220
240
-`check` - checks the consistency of the repository: if all recordings are downloaded and if all downloaded recordings are present on the disk, also the size of each recording file is checked. Run this command periodically to make sure everything is OK.
-`trash` - trashes recordings from Zoom Cloud. Run it like this:
231
253
232
-
./zoomrs-cli --dbg --cmd trash --trash 2
254
+
```sh
255
+
./zoomrs-cli --dbg --cmd trash --trash 2
256
+
```
233
257
234
258
where `2` is 2 days before today, so all the recordings from the bay before yesterday will be trashed. This is designed this way to run it as a cron job every day. Cron job line example:
will trash all recordings from the day before yesterday every day at 10:00 AM. `--config` option is used to specify the path to the configuration file. `--dbg` option can be used to enable debug logging. Logs are written to stdout, and redirected to `/var/log/cron.log` in the example above.
239
264
240
265
-`cloudcap` - trims recordings from Zoom Cloud to avoid exceeding the storage limit. Leaves `Client.CloudCapacityHardLimit` bytes of the most recent recordings (review the value in config before running!), trashes the rest. Cron job line to run it every day at 5:30 AM (don't mind the paths, they are specific to my setup, use your own):
-`sync` - syncs recordings from Zoom Cloud. Run it like this:
245
-
246
-
./zoomrs-cli --dbg --cmd sync --days 1
270
+
```sh
271
+
./zoomrs-cli --dbg --cmd sync --days 1
272
+
```
247
273
248
274
`--days` parameter used with the value of `1` to sync all the yesterday recordings (1 day before today). This is designed this way to run it as a cron job. Cron job line example:
will sync all recordings from the yesterday every day at 3:00 AM. `--config` option is used to specify the path to the configuration file. `--dbg` option can be used to enable debug logging. Logs are written to stdout, and redirected to `/var/log/cron.log` in the example above.
253
280
254
-
_* Note that CLI tool uses different configuration file then the server with different Zoom API credentials to avoid spoiling services's auth token when running CLI. Also, running multi-server setup you want to sync recordings only after all servers have downloaded them, so you need to run CLI tool on one of the servers, allow syncing records in CLI config and deny it in servers configs._
281
+
> [!NOTE] Using multiple credentials
282
+
> CLI tool uses different configuration file then the server with different Zoom API credentials to avoid spoiling services's auth token when running CLI. Also, running multi-server setup you want to sync recordings only after all servers have downloaded them, so you need to run CLI tool on one of the servers, allow syncing records in CLI config and deny it in servers configs.
255
283
256
284
## Running multiple instances
257
285
You can run multiple instances of the service to increase reliability, duplicate downloaded data for redundancy. Each instance should have its own configuration file and its own database file. Each instance should have its own Zoom API credentials. Consider following setup as an example:
@@ -261,10 +289,17 @@ You can run multiple instances of the service to increase reliability, duplicate
261
289
- Run the service with `server.sync_job: false` and `server.download_job: false` so it will just host the API. Run downloader with cron job (see `sync` cmd crontab line example in the previous section). This way you can set the time to run the download job
262
290
3. Run cleanup job on one of the instances (see `trash` cmd crontab line example in the previous section). Use configuration file that enumerates all the instances in `server.instances` section. This way cleanup job will check all the instances for consistency and trash/delete recordings from Zoom Cloud only if all the instances have downloaded them. Disable deleting and trashing downloaded recordings (`client.trash_downloaded: false` and `client.delete_downloaded: false` in the configuration file) on every other instance but this one.
263
291
264
-
### Database backup
265
-
Backup database file regularly to prevent data loss. See example shell script at `dist/backup_db.sh`. It can be run as a cron job like this:
292
+
> [!NOTE] Copy yesterday's recordings from "Main" instance to "Secondary" instance
293
+
Secondary instance can run something like this to copy yesterday's recordings from "Main" instance:
294
+
```sh
295
+
sleep 1s && date && scp -r server.local:/data/`date --date="yesterday" +%Y-%m-%d` /data/ && date
296
+
```
266
297
267
-
# 0 10 * * * sh $HOME/go/src/zoomrs/backup_db.sh
298
+
> [!NOTE] Database backup
299
+
Backup database file regularly to prevent data loss. See example shell script at `dist/backup_db.sh`. It can be run as a cron job like this:
300
+
```sh
301
+
0 10 *** sh $HOME/go/src/zoomrs/backup_db.sh
302
+
```
268
303
269
304
## Contributing
270
305
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Check the existing issues to see if your problem is already being discussed or if you're willing to help with one of them. Tests are highly appreciated.
@@ -276,9 +311,9 @@ Pull requests are welcome. For major changes, please open an issue first to disc
276
311
If you have any security issue to report, contact project owner directly at [master@parMaster.com.ua](mailto:master@parMaster.com.ua) or use Issues section of this repository.
277
312
278
313
## Responsibility
279
-
The author of this project is not responsible for any damage caused by the use of this software. Use it at your own risk.
314
+
The author of this project is not responsible for any damage caused by the use of this software. Use it at your own risk. However, the software is being used in production at least since May 2023 on a number of devices, processing hundreds of GB of data every day and is considered stable.
280
315
281
316
## Credits
282
317
-[lgr](github.com/go-pkgz/lgr) - simple but effective logging package
283
318
-[go-sqlite3](github.com/mattn/go-sqlite3) as a database driver
Copy file name to clipboardExpand all lines: dist/README.md
+17-6Lines changed: 17 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,32 +13,43 @@ Example self-documented configuration file `config.yml` included.
13
13
### Foreground mode
14
14
Plain and simple `./zoomrs` should load a default `config.yml` file and launch if everything is configured correctly:
15
15
16
-
./zoomrs
16
+
```sh
17
+
./zoomrs
18
+
```
17
19
18
20
or specify config file and debug mode:
19
21
20
-
./zoomrs --config custom_config.yml --dbg
22
+
```sh
23
+
./zoomrs --config custom_config.yml --dbg
24
+
```
21
25
22
26
To stop the service press `Ctrl+C` (or send `SIGINT`, `SIGTERM` signal to the process)
23
27
24
28
### Systemd service
25
29
1. Configure the service and make sure it runs in foreground mode (see above).
26
30
2. Run `make deploy` to build the binary and copy everything where it belongs (see `Makefile` and `zoomrs.service` for details), enable and run the service
27
31
28
-
make deploy
32
+
```sh
33
+
make deploy
34
+
```
29
35
30
36
3. Run `make status` to check the status of the service
31
37
32
-
make status
38
+
```sh
39
+
make status
40
+
```
33
41
34
42
Log files are located at `/var/log/zoomrs.log` and `/var/log/zoomrs.err` by default.
35
43
36
44
### CLI Tool
37
45
CLI tool command example:
38
46
39
-
./zoomrs-cli --cmd check --config config.yml
47
+
```sh
48
+
./zoomrs-cli --cmd check --config config.yml
49
+
```
40
50
41
51
Refer to the [README](https://github.com/parmaster/zoomrs#readme) in main repository to learn more about the CLI tool and its commands.
42
52
43
53
## Responsibility
44
-
The author of this project is not responsible for any damage caused by the use of this software. Use it at your own risk.
54
+
The author of this project is not responsible for any damage caused by the use of this software. Use it at your own risk. However, the software is being used in production at least since May 2023 on a number of devices, processing hundreds of GB of data every day and is considered stable.
55
+
If you find a bug or have a feature request, please [open an issue](https://github.com/parMaster/zoomrs/issues/new/choose) on GitHub. Thank you!
0 commit comments