Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation #108

Open
zilchms opened this issue Jan 3, 2024 · 1 comment
Open

Improve documentation #108

zilchms opened this issue Jan 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@zilchms
Copy link

zilchms commented Jan 3, 2024

This provider seems to lack some important documentation.
After installing the provider and providing the correct config in the homeserver yaml, is there a need to build additional Infrastructure such as a systemd timer that calls the regular clean up job for new media files? Or is the provider doing this automatically for new media?
There seems to be no good information at this time to be found and this would be a good place to add such documentation.

Edit: This ties a bit into matrix-org/synapse#7140 which could either be linked or some basic directions given on what the provided example configuration here does.

@zilchms zilchms changed the title Thi Improve documentation Jan 3, 2024
@erikjohnston erikjohnston added the enhancement New feature or request label Jan 11, 2024
@col-panic
Copy link

So to provide some hints to others (info is distributed over the issues here)

I run this script regulary using all files not used more than an hour ago
/usr/local/bin/s3_media_upload update --homeserver-config-path /data/homeserver.yaml /data/media_store/ 1h

where the output might be

Syncing files that haven't been accessed since: 2024-09-24 08:03:53.652339
Synced 11 new rows
100%|██████████| 11/11 [00:00<00:00, 4465.91files/s]
Updated 7 as deleted

and the usage info of s3_media_upload is

# /usr/local/bin/s3_media_upload -h
usage: s3_media_upload [-h] [--no-progress] {update-db,check-deleted,update,write,upload} ...

positional arguments:
  {update-db,check-deleted,update,write,upload}
                        command to run
    update-db           Syncs rows from database to local cache
    check-deleted       Check whether files in the local cache still exist under given path
    update              Updates local cache. Equivalent to running update-db and check-deleted
    write               Outputs all file and directory paths in the local cache that we may not have deleted. check-deleted should be run first to update cache.
    upload              Uploads media to s3 based on local cache

options:
  -h, --help            show this help message and exit
  --no-progress         do not show progress bars

This synchronizes local files to the s3 storage, and MARKS them as deleted in the database. What seems to be left are the files itself in your local media storage which seem not get deleted by the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants