Mastodon: tootctl command to backup local media only

Created on 20 Jan 2020  ·  3Comments  ·  Source: tootsuite/mastodon

Pitch

A tootctl command that makes a copy of all local media only, in a way that can be reimported by Mastodon if restoring the instance.

Motivation

Remote media can be refetched while local media cannot - and backing up hundreds of gigabytes of media is expensive.

Most helpful comment

I totally agree with this. Backing up the entire /public/system dir of my server (2500 local users/ 3540 federated servers) takes days. For days I'm thinking could be a significant improvement be able to back up only all local users' media/avatar/header files and forget about all other remote servers media files.
In exemple,
remote servers dir: /public/system/remote
local users dir: /public/system/local

@Gargron what do you think? is this technically possible?

All 3 comments

It would be useful.

Possibly out of scope for this request, but a backup/restore command in general would be useful. One that could dump the database as well as the local media, compress and an option to upload to a remote S3 bucket.

Possibly even a way to schedule them in Sidekiq and view the backups via the admin interface.

I totally agree with this. Backing up the entire /public/system dir of my server (2500 local users/ 3540 federated servers) takes days. For days I'm thinking could be a significant improvement be able to back up only all local users' media/avatar/header files and forget about all other remote servers media files.
In exemple,
remote servers dir: /public/system/remote
local users dir: /public/system/local

@Gargron what do you think? is this technically possible?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phryk picture phryk  ·  3Comments

selfagency picture selfagency  ·  3Comments

ccoenen picture ccoenen  ·  3Comments

KellerFuchs picture KellerFuchs  ·  3Comments

thomaskuntzz picture thomaskuntzz  ·  3Comments