diff --git a/README b/README new file mode 100644 index 0000000..1024dc5 --- /dev/null +++ b/README @@ -0,0 +1,28 @@ +## Barusu - a python tool to back up your apt packages and dconf settings + +# Usage: + +backup_assistant [opts] +Options: + `-h --help`: show help and exit + `-d --backup-dir [directory]`: set the directory for the backup/restoration (default is ~/.backups) + `-r --restore`: run the restoration (from backupdir). You must be root to restore, as you'll install packages + +# Using with cron + +In a terminal run: `crontab` (you might need to choose an editor to continue) +Once you see your crontab in your editor paste the following line at the end: +`` + +# How it works: + +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 + +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` +It is possible to provide an alternative backup folder using option `-d` or `backup-dir` as with backups