Operator can make back-ups of applications' mutable file systems #126

Open
opened 2025-02-12 09:18:39 +01:00 by kiara · 4 comments
Owner

As an operator,
given I run Fediversity applications,
I want to be able to make back-ups of applications' mutable file systems,
in order to rest assured I will not lose important data.

implementation notes

May be handled using SelfHostBlocks' Backup Contract.

**As** an operator, **given** I run Fediversity applications, **I want** to be able to make back-ups of applications' mutable file systems, **in order to** rest assured I will not lose important data. ## implementation notes May be handled using SelfHostBlocks' [Backup Contract](https://shb.skarabox.com/contracts-backup.html).
Author
Owner

@Toast has wondered if our applications' state might not all already be in just DBs + S3.
to verify, we might say check the applications' dataDir.

@Toast has wondered if our applications' state might not all already be in just DBs + S3. to verify, we might say check the applications' `dataDir`.
Member

Indeed!

So far for the operator applications we currently support (mastodon, peertube, pixelfed), most seem to use S3 storage exclusively. However, with peertube, the documentation is not the clearest about it.

https://docs.joinpeertube.org/maintain/remote-storage#remote-storage-s3 mentions this:

Live videos are still stored on the disk. If replay is enabled, they will be moved in the object storage after transcoding.

Indeed! So far for the operator applications we currently support (mastodon, peertube, pixelfed), most seem to use S3 storage exclusively. However, with peertube, the documentation is not the clearest about it. https://docs.joinpeertube.org/maintain/remote-storage#remote-storage-s3 mentions this: > Live videos are still stored on the disk. If replay is enabled, they will be moved in the object storage after transcoding.
Member

For peertube, the migration guide mentions backing up two directories

  1. /var/lib/peertube/config
    Should contain NixOS generated files exclusively, however after checking that directory on out tests, there's also a local.yaml
    with some sort of secret.

    Edit: this secret is already handledimage
  2. /var/lib/peertube/storage
    We use S3 so it should be empty, however peertube creates the file structure it would have if we used file storage instead.
    I inspected it after running the tests too, and it does leave some files over image
    I am unfamiliar with peertube so I don't know if this data would be regenerated on startup, or as needed (with thumbnails), so I don't know if it's worth backing up
For peertube, the migration guide mentions backing up two directories 1. `/var/lib/peertube/config` ~~Should contain NixOS generated files exclusively, however after checking that directory on out tests, there's also a `local.yaml` with [some sort of secret](https://github.com/Chocobozzz/PeerTube/blob/f78c01f0b51359220f5d717bc662685712c43ddd/config/default.yaml#L17).~~ Edit: this secret is already handled![image](/attachments/4e40e611-ce80-40e4-a57b-c018e2e2c16d) 2. `/var/lib/peertube/storage` We use S3 so it should be empty, however peertube creates the file structure it would have if we used file storage instead. I inspected it after running the tests too, and it does leave some files over ![image](/attachments/8febef00-a9f3-4cb0-95c7-f4fa254bea23) I am unfamiliar with peertube so I don't know if this data would be regenerated on startup, or as needed (with thumbnails), so I don't know if it's worth backing up
Member

For pixelfed, the documentation is severely lacking in this regard, so I have no backup or migration guide available.
However, from looking at the files in /var/lib/pixelfed, we might want to back them up, since there's some keys there (and also a lot of .gitignore files that I'm excluding here):image

For pixelfed, the documentation is severely lacking in this regard, so I have no backup or migration guide available. However, from looking at the files in `/var/lib/pixelfed`, we might want to back them up, since there's some keys there (and also a lot of `.gitignore` files that I'm excluding here):![image](/attachments/9b9b754b-b273-4403-af4a-0bea45687cca)
216 KiB
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#29 Backups for Forgejo
fediversity/fediversity
Depends on
#138 VMs use central file storage
fediversity/fediversity
Reference
fediversity/fediversity#126
No description provided.