Skip to content

Commit

Permalink
chore: introduce the stable-4.x branch (#2888)
Browse files Browse the repository at this point in the history
  • Loading branch information
libretime-bot committed Jan 13, 2024
1 parent 1ea9fdb commit e47ba9d
Show file tree
Hide file tree
Showing 125 changed files with 7,715 additions and 0 deletions.
29 changes: 29 additions & 0 deletions versioned_docs/version-stable-4.x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: Welcome
sidebar_position: 10
---

Welcome to the **LibreTime documentation**, you should find everything you need to know about LibreTime.

## Getting started

**Are you new to LibreTime? This is the place to start!**

The documentation is divided into multiple parts:

- the [Administrator manual](./admin-manual) provide guides and references to setup and configure LibreTime.
- the [User manual](./user-manual) provide guides and tutorials for managers, and content creators to use LibreTime.
- the [Developer manual](./developer-manual) provide guides to integrate LibreTime, or improve and contribute to LibreTime.

## Getting help

Having trouble? We’d like to help!

- [:question: Try the Forum; it’s got answers to many common questions](https://discourse.libretime.org/).
- [:bug: Report bugs with LibreTime in our ticket tracker.](https://github.com/libretime/libretime/issues)

## History

LibreTime is a fork of AirTime due to stalled development of the open source version. For background on this, see this [open letter to the Airtime community](https://gist.github.com/hairmare/8c03b69c9accc90cfe31fd7e77c3b07d).

Airtime itself was based on the software called Campcaster. You can find more information about the [early days of Campcaster and Airtime in the repository](https://github.com/libretime/libretime/blob/main/LEGACY.md).
33 changes: 33 additions & 0 deletions versioned_docs/version-stable-4.x/admin-manual/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Administrator manual
---

Welcome to the **LibreTime administrator manual**, you should find guides and references to setup and configure LibreTime.

:::caution

This documentation assumes that you:

- have basic understanding of command line interfaces,
- have a basic understanding of networking.

:::

:::tip

Before following any steps, be sure that your system is up-to-date.

:::

## Install and configure

- [:rocket: Install LibreTime](./install/README.md)
- [:arrow_up: Upgrade from a previous install](./install/upgrade.md)
- [:airplane_arriving: Migrate from Airtime](./install/migrate-from-airtime.md)
- [:gear: Configure your installation](./configuration.md)
- [:lock: Put your installation behind a reverse proxy](./install/reverse-proxy.md)

## Advanced

- [:warning: Setup automated backups](./backup.md)
- [:heavy_check_mark: Use a custom authentication system](./custom-authentication.md)
2 changes: 2 additions & 0 deletions versioned_docs/version-stable-4.x/admin-manual/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: Admin manual
position: 20
98 changes: 98 additions & 0 deletions versioned_docs/version-stable-4.x/admin-manual/backup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: Backup
sidebar_position: 10
---

## Create a backup

This guide walk you though the steps required to create a full backup of your installation.

:::info

Remember to **automate** and **test** the backup process and to have it run regularly. Having an **automated** and **tested** restoring process is also recommended.

:::

:::caution

Feel free to pick the backup software of your choice, but know that rsync and similar tools aren't backup tools. You could use [restic](https://restic.net/) or [borg](https://borgbackup.readthedocs.io/).

:::

### Backup the configuration

On common setups, you need to backup the entire `/etc/libretime` folder.

### Backup the database

You need to backup the PostgreSQL database, which holds the entire data of your installation.

Here is an example to dump your PostgreSQL database to a plain text SQL file:

```bash
sudo -u postgres pg_dump --no-owner --no-privileges libretime > libretime.sql
```

:::note

We use the `--no-owner` and `--no-privileges` flags to ignore roles
and permissions details about the database. This can be useful when restoring
to database or role that have different names (e.g. `airtime` to `libretime`).

:::

Please read the `pg_dump` usage for additional details.

### Backup the storage

You need to backup the entire file storage, which holds all the files of your installation.

The path to your storage is defined in the [configuration](./configuration.md) file.

## Restore a backup

### Install or cleanup

If you are restoring a backup on a fresh system, we recommend that you first [install LibreTime](./install/README.md), and **stop before the [setup tasks](./install/README.md#setup)**.

If you are restoring a backup on an existing system, make sure to clean the old **database** and **files storage**.

### Restore the configuration

Copy the backed configuration files back to the [configuration](./configuration.md) folder.

If you are upgrading LibreTime, edit the configuration file to match the new configuration schema and update any changed values. See the [configuration](./configuration.md) documentation for more details.

### Restore the database

Restore the database by using the one of the following command depending on the format of you backup file:

```bash
# With a plain text SQL file
sudo -u libretime libretime-api dbshell < libretime.sql

# With a custom pg_dump format
sudo -u postgres pg_restore --no-owner --no-privileges --dbname=libretime libretime.dump
```

:::info

The `libretime-api dbshell` command is a shortcut to the `psql` command, and automatically passes the database access details (e.g. database name, user, password).

:::

:::note

We use the `--no-owner` and `--no-privileges` flags to ignore roles
and permissions details about the database. This can be useful when restoring
to database or role that have different names.

:::

If you are upgrading LibreTime, make sure to apply the [database migration](./install/upgrade.md#apply-migrations).

### Restore the storage

Copy the entire backed file storage back to the storage path.

The path to your storage is defined in the [configuration](./configuration.md) file.
Loading

0 comments on commit e47ba9d

Please sign in to comment.