bit-team / backintime

Back In Time - An easy-to-use backup tool for GNU Linux using rsync in the back
https://backintime.readthedocs.io
GNU General Public License v2.0
2.01k stars 197 forks source link

CLI or TUI to create/edit the config in text mode for headless operation #254

Open Germar opened 8 years ago

Germar commented 8 years ago

Back In Time is a great piece of software :-) I've managed to use it also on my embedded NAS, which carries a Debian distribution. I just installed the backintime-common package, because GUIs are not supported in there. Unfortunately, the only very uncomfortable thing is that I had to "prepare" a configuration file on my desktop PC using the KDE interface and then copy it on the NAS. In fact, some configuration options in the config file are not so easy to understand (for example: a unit of "20" may represent days or gigabytes, if I remember well...), so a direct editing of the config file, apart from small tunings, is not an easy task. Also, BIT version differences between environments might make it even more difficult, because you may not know exactly which options are available/supported.

So, I think a good enhancement would be to provide a text-based UI or a new CLI program that allows you to create/edit the configuration file, so that the current backintime executable can then run the defined profiles as usual.

As an alternative, a good documentation of the different configuration options and syntax (which considers BIT version differences) would be valuable.


Imported from Launchpad using lp2gh.

Germar commented 8 years ago

(by germar) Please take a look at 'man backintime-config'. This explains all config keys. You can find examples in /usr/share/doc/backintime/examples/.

A CLI would be a nice feature and there was already a branch in https://code.launchpad.net/~ryan-c-ahearn/backintime/command_line_interface But unfortunately this branch was never merged into main dev branch. By now it is completely outdated and would need a lot of work to comply with main branch.

I'm currently working on getting rid of two GUIs (Gnome/Gtk+ and KDE) to make further development easier with only one Qt4 GUI. But if someone would like to overhaul the CLI code we could merge this into 1.1 series.

Germar commented 8 years ago

(by mauromol) Sorry for not knowing about the "man backintime-config", it is certainly useful meanwhile!

emtiu commented 1 year ago

When is comes to the question TUI vs. CLI, I think a CLI would have an additional use in scripting. There may be situation where you want to modify your BackInTime configs by script (e.g. to change the include/exclude lists on several profiles at once).

So, ideally we would have both CLI commands and an ncurses-style TUI. But if there should be only one of those, it should be CLI.

buhtz commented 3 weeks ago

In short: A config file in human readable TOML format would vanish the need of having a CLI/TUI to edit the BIT config file.

I setup backintime on a headless server for the first time. So I needed to edit the config file. I got the idea that editing that file might be more easier if its syntax would be easier to read. In the Python world today TOML is state of the art. It looks a bit more similar to Windows INI.

The key point is that it is easy to read and edit for human begins.

If we have an human readable config file format I would say we don't need a CLI/TUI for this anymore. OK, it might still be more convenient and less prone to errors. But a TOML config file would IMHO lower the urgency of having a CLI/TUI to edit a config file.