Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Ideas for programs that don't exist: 3

This is an oc­ca­sion­al se­ries of posts where I will share ideas for pro­grams that don't ex­ist, but should. The goal is to in­spire de­vel­op­ers to cre­ate use­ful tools that can make our lives eas­i­er. Or, more like­ly, to re­mind me about these ideas so I can cre­ate them my­self. Or even more like­ly, to just get them out of my head so I can stop think­ing about them.

Idea 3: A program that does backups the way I want

I don't want to con­fig­ure things on many com­put­er­s. I want to con­fig­ure things once in one com­put­er and have back­ups for ev­ery­thing I care about, done prop­er­ly.

There is a great back­up pro­gram called restic that does back­ups RIGHT. It is fast, it is se­cure, it is easy to use, and it has a lot of fea­tures.

There is a frontend for it called backrest that does a lot of things right. It separates the concept of repo which is what you backup to and plan which is what and when you backup.

But I want more, I want to separate plan (when and how) from source (where the data is)

I want to work like this:

  1. Create a repo like "this folder here on this computer is a repo called 'foo' and it has a password and whatnot"
  2. Create a plan like "every day at 3 AM, backup to 'foo', keep 30 days of backups there, and every week at 2am on sundays, backup to 'bar' which is a remote repo and keep 10 weeks of backups there"
  3. Create a source like "the /home/ralsina folder in my notebook"
  4. Create a backup which is a combination of a source and a plan like "backup the /home/ralsina folder in my notebook to 'foo' every day at 3 AM"

Fur­ther, I want this to just work on all my com­put­ers as long as I have ssh cor­rect­ly con­fig­ured to al­low it.

My back­up con­troller should log in­to what­ev­er com­put­er the re­po is in and in­stall restic there. Then log in­to the source com­put­er anb in­stall restic there. Then cre­ate the re­po, and when the plan says it's time to back­up, it should log in­to the source com­put­er and run the back­up com­mand there, and then log in­to the re­po com­put­er and run some­thing there if it needs run­ning.

Then I want it to keep logs and no­ti­fy me via go­ti­fy or some­thing if some­thing goes wrong.

Is that too much to ask?


Contents © 2000-2025 Roberto Alsina