docs: updated readme and help text

This commit is contained in:
2023-04-19 13:36:43 +02:00
parent 0583c242c2
commit 6443ad4f10
2 changed files with 7 additions and 8 deletions

View File

@@ -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

View File

@@ -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"):