https://github.com/jacoblincool/moodle-backup
Backup Your Personal Data from Moodle.
https://github.com/jacoblincool/moodle-backup
Last synced: 12 months ago
JSON representation
Backup Your Personal Data from Moodle.
- Host: GitHub
- URL: https://github.com/jacoblincool/moodle-backup
- Owner: JacobLinCool
- License: mit
- Created: 2023-01-03T17:21:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-30T10:54:16.000Z (over 2 years ago)
- Last Synced: 2025-04-16T01:49:32.787Z (about 1 year ago)
- Language: TypeScript
- Homepage: https://moodle-backup.jacoblin.cool
- Size: 234 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Moodle Backup
Backup Your Personal Data from Moodle.

## Usage
There are three ways to use this tool:
1. It can be used as a command line tool, simply run `moodle-backup` in your terminal.
2. It can be used as a Node.js module, simply install `moodle-backup-core` and use it in your code.
3. It can be used as a web app, simply run `moodle-backup-server` in your terminal, or go to [https://moodle-backup.jacoblin.cool](https://moodle-backup.jacoblin.cool) if you are a NTNU student.
> `pnpm` in the following instructions is a package manager, you can use `npm` or `yarn` instead.
### Command Line
You can install `moodle-backup` globally by running `pnpm i -g moodle-backup`.
Then you can run `moodle-backup [options] [username] [password]` in your terminal.
> If you do not have chrome or chromium installed, you may need to manually install it before using this tool.
### Node.js Module
You can install `moodle-backup-core` by running `pnpm i moodle-backup-core`.
Then you can use it in your code:
```ts
import { Exporter } from "moodle-backup-core";
const exporter = new Exporter(MOODLE_URL, USERNAME, PASSWORD, OUTPUT_DIR);
await exporter.run();
```
### Web App
You can install `moodle-backup-server` by running `pnpm i -g moodle-backup-server`.
Then you can run `moodle-backup-server` in your terminal, and go to `http://localhost:3000` in your browser.
There is also a prebuilt Docker image available at [https://hub.docker.com/r/jacoblincool/moodle-backup-server](https://hub.docker.com/r/jacoblincool/moodle-backup-server), which supports `arm64` and `amd64` architectures.
> You can find the supported environment variables in the [packages/server/src/config.ts](packages/server/src/config.ts)