Skip to main content

Posts

Showing posts from November, 2021

Rocketchat - Migrate between servers

At work we're using rocketchat for our internal chat and recently I had to migrate it to a new server. When searching the documentation for a migration path, I did not find a valid solution so here's my take on it. The migration is fairly easy and only contains a few steps. Make sure that the rocketchat instance is stopped during this operations to guarantee data integrity and the versions on both servers should match. First on the old server, create a backup of the existing mongodb database. This requires mongodb to be started on the server [archy@rocketchat01 ~]$ sudo mongodump --gzip --archive=/var/tmp/rocketchat_$(date +%F).tar.gz Now, transfer the compressed archive between the servers,  [archy@rocketchat01 ~]$ $ rsync -vrlptgoDxhPe ssh /var/tmp/rocketchat_$(date +%F).tar.gz Downloads/ archy@rocketchat02.archyslife.lan:/var/tmp/ When the transfer is complete, restore the mongodb from the archive. This requires mongodb to be started on the server [archy@rocketchat02

GrapheneOS - Utilize android devices to pull apks and install them on a GrapheneOS device

I think this is rather a niche at all since there probably are trusted apk downloaders out there but since I don't trust them, I wanted a way to 'download' apks directly from google to ensure the integrity of the app. Notice that I'm utilizing an android tablet to install the app and then pull the installed apk from there. First, install the required tools. I'm using Fedora 34 as my main OS so the package manager is yum / dnf for me. $ sudo yum -d 2 -y install android-tools Start the adb-server: $ sudo adb start-server Once that is finished, enable usb debugging on your android device and plug it in to your computer and authorize the access. Now, list the packages and grep the application that you want to pull from the device: $ sudo adb shell pm list packages | grep -ie 'myapp' The previous command will get you, hopefully, one line of output in the format of 'package:io.myapp.app' which refers to the full name of the installed package. Once

FreeIPA - Store automount maps in ldap

FreeIPA provides a nice way to create automount maps and store them in the replicated ldap tree which allows you to have user's homedirs on a central storage server and mount them on demand to each server. First up, let's prepare the nfs server for this and install the required packages and start the services [archy@nfs ~]$ sudo yum -d 2 -y install nfs-utils [archy@nfs ~]$ sudo systemctl enable --now nfs-server.service With the required nfs services started already, create the export for your homedirs. I'll be using '/var/nfs/home' as my share where all homedirectories are located [archy@nfs ~]$ echo '/var/nfs/home *.archyslife.lan(rw,secure,sync)' | sudo tee /etc/exports [archy@nfs ~]$ sudo exportfs -rav Next, create the automount map and automountkey in ipa [archy@ipa ~]$ ipa automountmap-add-indirect default auto.home --mount /home/centralusers [archy@ipa ~]$ ipa automountkey-add default auto.home --key '*' --info 'nfs.archysli