We tested it by adding this Cron:
@monthly find /app/data/files/ -type f -name "*.mp4" -mtime +60 -delete
The purpose was to remove all videos with the extension .mp4 that are older than 2 months.
We have no idea if it's working or not. We can't see anything in the logs.
If anyone know how to improve the Cron please let me know
According to https://forum.mattermost.com/t/is-it-safe-to-delete-a-file-from-the-data-folder/15732 you can just delete the old files from the filesystem (but read that post about the warning/side effects).
Thanks so much for your thoughtful and encouraging response – that really means a lot.
I also really like how you framed Cloudron’s own way of being open – that made me smile and actually made me think a bit deeper about what "openness" means in different contexts.
You’re right: sometimes we overlook the tools right in front of us. Glad we could rediscover Matrix together – and yes, Zulip has strong merits too. I appreciate your balanced view.
@djxx oh wow, thanks for the detailed write up! Hopefully it's useful for other people migrating as well. I will add a link to your report from our docs.
Connect to postgres like this (replace the variables below with the ones you put in pgloader):
export PGPASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD}
psql -h ${CLOUDRON_POSTGRESQL_HOST} -p ${CLOUDRON_POSTGRESQL_PORT} -U ${CLOUDRON_POSTGRESQL_USERNAME} -d ${CLOUDRON_POSTGRESQL_DATABASE}
@Lanhild Sorry missed your message.
I will see if I can do another test migration this afternoon (CEST) and take some more notes. But basically I wrote the steps below on a clean Mattermost PostgreSQL install:
Dumped the DB with : pg_dump -d mattermost > mattermost.dump
Renamed on cloudron config.json to config.json.orig
Copied mattermost.dump and config.json to cloudron mattermost via the file manager
Edited config.json with the value from config.json.orig (to get the PostgreSQL details)
"ServiceSettings" => "SiteURL"
"SqlSettings" => "DataSource" and "DataSourceReplicas"
"FileSettings" => "Directory"
From the terminal app did PASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD} pg_restore -h ${CLOUDRON_POSTGRESQL_HOST} -p ${CLOUDRON_POSTGRESQL_PORT} -U ${CLOUDRON_POSTGRESQL_USERNAME} -d ${CLOUDRON_POSTGRESQL_DATABASE} ../data/mattermost.dump
Rsynced all my attachments from origin_server to cloudron_server:app_folder (cf girish post )
Restarted the app
You can run the CLI tool on Cloudron like https://docs.cloudron.io/apps/mattermost/#command-line-tool . Instead of the import command at https://docs.cloudron.io/apps/mattermost/#migration , use the export command.
To get a file off Cloudron, easiest way is to export to a path under /app/data and then use the File manager to download it.
I am also curious why you are not able to update mattermost on Cloudron. It's all automatic.