Restoring Postgresql DB backup with different owner role

Like the title says, when restoring a Postgresql database onto a different server which happens to have a dfferent role owner, extra care is needed, otherwise similar error message below will come up: pg_restore: from TOC entry 217; 1259 17163 TABLE users_collections webdev1 pg_restore: error: could not execute query: ERROR: role "webdev1" does not exist Command was: ALTER TABLE public.users_collections OWNER TO webdev1; pg_restore: from TOC entry 218; 1259 17168 TABLE users_organizations webdev1 pg_restore: error: could not execute query: ERROR: role "webdev1" does not exist Command was: ALTER TABLE public.users_organizations OWNER TO webdev1; pg_restore: warning: errors ignored on restore: 19 What happened was that there was no role named webdev1 on the Postgreseql server where the database restoring was performed. Instead, on my database server, I had a role named webdev2. ...

July 3, 2022 · 1 min · 213 words · kenno

Mounting NFS share with Systemd Automount

On my main workstation running Fedora 36, I use both autofs and Systemd automount to mount NFS on demand. Gradually, I’m leaning toward just to use Systemd automount. Here is just a brain dump with an example of mounting an NFS share with Systemd autmount. Though, I had done this before, I found this blog post, available at [1], provides details on how to do this. Assumption The NFS server and share: banan.example.com:/srv/music The preferred local mount point: /srv/banan/music Create required Systemd unit files We will need 2 unit files: the mount unit and the automount unit. ...

June 13, 2022 · 2 min · 359 words · kenno

How to Enable Proxmox Guest Agent

I recently had a need to run Proxmox Virtual Environment (7.2-4) at home for a project. So far everything seemed to be straight forward, partially thanks to KVM technology used in Promox. However, I also learned a few things along the way too. The first thing that I had look up on the Internet to get it working is to activate (Promox) qemu-guest-agent. If you’re reading this, it’s likely you didn’t get it working on first trial either. ...

June 12, 2022 · 1 min · 184 words · kenno

Start and Stop Network Service on FreeBSD

A quick note for me to remind myself how to stop/start network service on FreeBSD (13.0). To stop or start, run one of the following commands: # service netif stop # service netif start To restart, just replace stop or start with restart: # service netif restart I also just found out that the above commands will nto restarting the routing service, as they only stop/start/restart network. To restart the routing service on FreeBSD, run: ...

June 5, 2022 · 1 min · 108 words · kenno

How to delete disk partitions on Windows using PowerShell

Today I just added an old SSD to a Windows machine to use it as a back up drive. With old disks, usually they come with existing data, and I wanted to get rid of it. The problem is I couldn’t figure out how to do this using the Disk Management, the native GUI application used to manage disks. The problem could be simple to Windows users. Basically, when I right-clicked on the 2 partitions (450 MB and 100 MB) on Disk 0, there is no option to remove them. ...

May 15, 2022 · 3 min · 618 words · kenno