Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Easy Automated Docker Volume Backups That Are Database Friendly

I recently picked up a Beelink EQR6 Mini PC to reduce some of the Docker stress on my aging Synology NAS. Since my Synology used the Btrfs filesystem, I never had to worry about file locks and corruption during a backup because that particular file system used copy-on-write (CoW). However, since I decided to use Ubuntu Server on my Mini PC and neglected choosing which filesystem I wanted to use, I ended up with ext4.

Here’s the problem though.

The ext4 filesystem does not support copy-on-write. This means that if I tried to make backups of my Docker volumes, I’d run the risk of file corruption if those files were in use at the time of backup. This is particularly more of a problem with Docker volumes that contain SQLite databases with write-ahead log (WAL) or databases in general.

There’s good news though! There are a few automated solutions for safe backups of Docker volumes that can be used with minimal effort.

Read More

TPDP Episode #22: NoSQL Databases And The Flexibility Of A Non-Relational Model

I am pleased to announce that the latest episode of The Polyglot Developer Podcast is now available for download. In this episode titled, NoSQL Databases and the Flexibility of a Non-Relational Model, I’m joined by Matt Groves where we talk about use-cases for NoSQL versus relational databases and how to use NoSQL in your own applications.

Matt Groves and I used to work together at Couchbase, which is a NoSQL database company, and is by no means the focus of this episode. The focus is NoSQL in general and all the great things that you can do with it.

Read More

Bulk Remove Unconfirmed Sendy Subscribers After A Certain Number Of Days

You may or may not know this, but I use Sendy to send out my monthly newsletters because it is incredibly cheap in comparison to competitors like Mailchimp. Anyone who has done list building before knows that over time you’re going to end up with a lot of stale subscribers that need to be cleaned in an effort to save space and keep things organized.

My email lists require a secondary opt-in to prevent SPAM subscriptions. The problem with this is I still get a lot of SPAM subscriptions even if they are never included in my newsletters. These subscriptions have no business being in my list, so it is best to remove them after so long.

We’re going to see how to use SQL to remove unconfirmed email subscribers in Sendy after so many days.

Read More

Using A SQLite Database For Local Data In A Golang Application

When developing an application with the Go programming language, you might find yourself needing to save data locally. If you’ve been keeping up you’ll remember that I’ve written about storing data remotely with Golang in a Couchbase NoSQL database, but never anything locally. Probably the easiest way to store data locally is with a SQLite database as it is a solid technology that has been around for a while.

We’re going to see how to use a SQLite database in our Golang application to read and write local data.

Read More

Backup WordPress Database And Filesystem Data On Linux With Scripts

If you’re like me, you run a WordPress blog and are terrified of the thought of something going wrong. With core updates, theme updates, plugin updates, and server component updates, there is a lot of room for error. This is where a WordPress backup could help ease your mind.

WordPress recommends taking a backup of your blog before any of these are done and there are even some popular plugins that will do this for you. For example, you could use the popular UpdraftPlus or similar, but I believe there is room for error in those as well. While I could be wrong, I think WordPress must be in good shape for backup plugins to be successful.

The alternative would be to create your own backup scripts that run on a cron schedule. We’re going to see how to do this for WordPress instances running on a Linux machine.

Read More

Create A URL Shortener With Golang And Couchbase NoSQL

Continuing down the road of Golang development I thought it would be a cool learning example to develop a URL shortener application similar to that of TinyURL or Bitly. I think these are great examples because not only does it teach you how to develop a RESTful API that uses a datasource, but it also challenges you to think critically when it comes to the algorithms.

Previously I had written about creating a URL shortener using my other favorite server-side technology, Node.js, but the languages are so different that it makes sense to try the same with the Go programming language. In this example we’re going to create an application that makes use of Golang, Couchbase, and a few other project dependencies.

Read More

TPDP Episode #6: PouchDB and its Usefulness in Development

As a web and mobile application developer, you may come to a point where you need to worry about data and how to synchronize it between devices in platforms. PouchDB is one of a few good solutions that makes this task significantly easier. In this episode of The Polyglot Developer Podcast, guest speaker Nolan Lawson and I discuss PouchDB and how it is being used in a lot of modern applications, both web and mobile.

Nolan Lawson is a Program Manager at Microsoft, but also one of the core contributors to the PouchDB open source project. In Episode #6: PouchDB and its Usefulness in Browser Based Development, we’re going to cover a lot of ground without actually showing how to use the database in your application. After all, this is an audio only podcast. You will however, be educated on a lot of the technical concepts and popular use cases behind the tool.

Read More