Chandra Sekar's Blog

The Tale of a Corrupt Backup

25 Feb, 2023 · 4 min read · #backup #restic #hardware

As I mentioned in the post about my backup system, I run restic check regularly, to test the integrity of my backup. It has never reported any error in my repository. It performs a quick, shallow check, and does not verify that all the data is intact. I also restore a random file, whenever I run restic check, to test recoverability.

Shortly after I wrote the previous post, I decided to run restic check --read-data for the first time ever. This reads every file in the repository and simulates a full restore. To my utter horror, it reported many errors like these!

Pack ID does not match, want 5e66c2ac, got e80051de
pack d64be86d contains 1 errors: [Blob ID does not match, want 8ebf2c10, got 350f6ba1]

 Read more

My Personal Backup System

24 Dec, 2022 · 5 min read · #backup #restic #rclone #b2

Computing devices and online services can fail catastrophically and take our data with them. It is crucial that we have a robust system to backup and restore our data, to protect against such events. This post details what I wanted from the backup system for my personal data and the tools I use to achieve them. This system has served me well over the last 5 years, across fat-fingerings and disk failures.

 Read more

Connection Leak in PgBouncer Behind AWS NLB

10 May, 2020 · 3 min read · #postgresql #aws #database

At a previous job, we had several instances of Ruby on Rails applications connecting to PostgreSQL through PgBouncer. The services and databases were deployed on bare-metal servers and chugged along fine. We then decided to migrate to AWS. Upon migration, we noticed that PgBouncer started leaking connections to PostgreSQL like a sieve, leading to exhaustion of the maximum number of connections configured in RDS.

 Read more

Using Command-Line Tools on Vim Buffers

23 Apr, 2020 · 3 min read · #vim #command-line #tips #linux

Vim offers many ways to use the command-line tools available on your system when editing. You can:

  1. insert the output of a command into the current buffer - e.g., insert the current date.
  2. process lines of the current buffer through a command - e.g., sum up a list of numbers in the file.
  3. manipulate lines of the current buffer using a command - e.g., sort a list of names in the file.

 Read more

GnuCash for Personal Finance: Online Quotes

28 Jul, 2018 · 2 min read · #gnucash #personal-finance #mutual-fund

This is third in the series of posts describing how I use GnuCash to manage my finances. In previous posts, I had discussed how I organize my accounts, record transactions and handle taxation in GnuCash. In this post I’ll show how GnuCash can be configured to fetch the current NAV of mutual funds from the Internet.

 Read more

  Older Posts →