Adminer Installation

Super light DataBase managing thingy:

INSTALL:

sudo mkdir /usr/share/adminer
sudo wget -O /usr/share/adminer/adminer.php https://www.adminer.org/latest.php

SYMLINK NGINX

sudo ln -s /usr/share/adminer/adminer.php /usr/share/nginx/html/adminer.php

SYMLINK APACHE:

sudo ln -s /usr/share/adminer/adminer.php /var/www/html/adminer.php

Sidenote: If you have your web root anwhere else, you need to link it to that specific point. Also, this has been a install for Debian 11.

Loading

Mastodon CLI commands

Again a quick not for myself and putting a copy here in case something internets goes poof; https://docs.joinmastodon.org/admin/tootctl/#media

tootctl media remove

Removes locally cached copies of media attachments, avatars or profile headers from other servers. By default, only media attachments are removed.

--days N
How old media attachments have to be before they are removed. In case of avatars and headers, how old the last webfinger request and update to the user has to be before they are removed. Defaults to 7.
--concurrency N
The number of workers to use for this task. Defaults to N=5.
--prune-profiles
Instead of media attachments, remove locally cached copies of avatars and headers from other servers. Cannot be combined with --remove-headers.
--remove-headers
Instead of media attachments, remove locally cached copies of headers from other servers. Cannot be combined with --prune-profiles.
--include-follows
Override the default behavior of --prune-profiles and --remove-headers to remove locally cached copies of avatars (and headers) from other servers, irrespective of follow status (by default, they are only removed from accounts that are not followed by or following anyone locally). Can only be used with --prune-profiles or --remove-headers.
--verbose
Print additional information while task is processing.
--dry-run
Print expected results only, without performing any actions.

tootctl media remove-orphans

Scans for files that do not belong to existing media attachments, and remove them. Please mind that some storage providers charge for the necessary API requests to list objects. Also, this operation requires iterating over every single file individually, so it will be slow.

--start-after
The Paperclip attachment key where the loop will start. Use this option if the command was interrupted before.
--dry-run
Print expected results only, without performing any actions.
--prefix
Traverse only a specific prefix of files in the system.
--fix-permissions
Sets S3 ACL to be default according to environment variables.

tootctl media refresh

Refetch remote media attachments from other servers. You must specify the source of media attachments with either --status, --account, --domain, or --days. If an attachment already exists in the database, it will not be overwritten unless you use --force.

--account ACCT
String username@domain handle of the account
--domain DOMAIN
FQDN string
--status ID
Local numeric ID of the status in the database.
--days N
The number of days to limit this task to.
--concurrency N
The number of workers to use for this task. Defaults to 5.
--verbose
Print additional information while task is processing.
--dry-run
Print expected results only, without performing any actions.
--force
Force redownload the remote resource and overwrite the local attachment.

tootctl media usage

Calculate disk space consumed by Mastodon.


tootctl media lookup

Prompts for a media URL, then looks up the status where the media is displayed.


Loading