From 6443ad4f10246ec0b541abf4c43cdaffac4d9500 Mon Sep 17 00:00:00 2001 From: Derisis13 Date: Wed, 19 Apr 2023 13:36:43 +0200 Subject: [PATCH] docs: updated readme and help text --- README.md | 13 ++++++------- main.py | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e5fc602..5aacd90 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# Barusu - a python tool to back up your apt packages and dconf settings +# Barusu - a python tool to back up your apt packages, flatpaks and dconf settings ## Usage: -backup_assistant [opts] +barusu [opts] Options: `-h --help`: show help and exit - `-d --backup-dir [directory]`: set the directory for the backup/restoration (default is ~/.backups) + `-d --backup-dir [directory]`: set the directory for the backup/restoration (default is $XDG_DATA_HOME/barusu if $XDG_DATA_HOME is defined, else ~/.local/share/barusu) `-r --restore`: run the restoration (from backupdir). You must be root to restore, as you'll install packages. If you are backing up from a directory different from `~/.backup` you need to use the `-d`/`--backup-dir` option BEFORE the `-r`/`--restore` - + `-a --action [afd]`: select actions to perform (default is all). Valid actions: `a` - back up apt packages, `d` - back up dconf settings, `f7 - back up flatpak apps ## Installation After downloading run in the directory you downloaded barusu to: `python3 setup.py install` @@ -28,10 +28,9 @@ Alternatively you can set up anacron (usually not installed by default) backup: 1. It uses `dpkg` to get a list of all installed packages. 2. It dumps all settings using `dconf` -3. The result is two files in `~/.backup` (unless specified otherwise): `packagelist.txt` and `dconf_out.txt` (and a hidden `.backupdone` file for internal usage of the program +3. The result is three files in `$XDG_DATA_HOME/barusu` (unless specified otherwise): `packages.txt`, `flatpaks.txt` and `dconf_out.txt` restore: (you must call the script as root when restoring!) -1. It uses `dpkg` to set a list of operations exported in `~/.backup/packagelist.txt` then calls `apt-get` to install them -2. It uses `dconf` to load settings exported in `~/.backup/dconf_out.txt` +You have to specify actions similar to backuping, they get executed in the following order: apt -> dconf -> flatpak It is possible to provide an alternative backup folder using option `-d` or `backup-dir` as with backups, but you need to specify the folder BEFORE the `-r`/`--restore` option diff --git a/main.py b/main.py index b409e4c..6e13b7e 100644 --- a/main.py +++ b/main.py @@ -129,7 +129,7 @@ if __name__ == '__main__': "\t-d --backup-dir [directory]: set the directory for the backup/restoration " "(default is $XDG_DATA_HOME/barusu if $XDG_DATA_HOME is defined, else ~/.local/share/barusu)\n" "\t-r --restore: run the restoration (from backupdir)\n" - "\t-a --action [a/d]: select actions to perform (default is all). Valid actions: " + "\t-a --action [afd]: select actions to perform (default is all). Valid actions: " "a - back up apt packages, d - back up dconf settings, f - back up flatpak apps") exit() elif option in ("-d", "--backup-dir"):