Merge branch 'master' into development

This commit is contained in:
daniele 2023-06-02 18:38:54 +02:00
commit 78760bdda3
Signed by: fuxino
GPG Key ID: 981A2B2A3BBF5514
4 changed files with 21 additions and 19 deletions

View File

@ -20,6 +20,10 @@ The script uses rsync to actually run the backup, so you will have to install it
sudo pacman -Syu rsync sudo pacman -Syu rsync
``` ```
It's also required to have python-dotenv
Optional dependencies are systemd-python to enable using systemd journal for logging, and dbus-python for desktop notifications.
## Install ## Install
To install the program, first clone the repository: To install the program, first clone the repository:
@ -27,26 +31,24 @@ To install the program, first clone the repository:
git clone https://github.com/Fuxino/simple_backup.git git clone https://github.com/Fuxino/simple_backup.git
``` ```
Install tools required to build and install the package: Then install the tools required to build the package:
```bash ```bash
pip install --upgrade build installer wheel pip install --upgrade build wheel
``` ```
Then run: Finally, run:
```bash ```bash
cd simple_backup cd simple_backup
python -m build --wheel python -m build --wheel
python -m installer dist/*.whl python -m pip install dist/*.whl
``` ```
For Arch Linux and Arch-based distros, two packages are available in the AUR (aur.archlinux.org): For Arch Linux and Arch-based distros, two packages are available in the AUR (aur.archlinux.org):
- **simple_backup** for the release version - **simple_backup** for the release version
- **simple_backup-git** for the git version - **simple_backup-git** for the git version
After installing, copy simple_backup.conf (if you used the PKGBUILD on Arch, it will be in /etc/simple_backup/) to $HOME/.config/simple_backup and edit is as needed.
## Remote backup ## Remote backup
> **Warning** > **Warning**
> This feature is experimental > This feature is experimental
@ -66,3 +68,4 @@ sudo --preserve-env=SSH_AUTH_SOCK -s simple_backup [options]
or by editing the sudoers file. or by editing the sudoers file.
If SSH key authentication is not available, password authentication will be used instead. If SSH key authentication is not available, password authentication will be used instead.

View File

@ -25,8 +25,14 @@ packages = simple_backup
python_requires = >=3.7 python_requires = >=3.7
install_requires = install_requires =
python-dotenv python-dotenv
systemd-python
paramiko [options.extras_require]
JOURNAL =
systemd-python
NOTIFICATIONS =
dbus-python
REMOTE =
paramiko
[options.entry_points] [options.entry_points]
console_scripts = console_scripts =

View File

@ -1,8 +0,0 @@
post_install() {
echo "An example configuration file is found in /etc/simple_backup/simple_backup.conf."
echo "Copy it to ~/config/simple_backup/simple_backup.conf and modify it as needed"
}
post_upgrade() {
post_install
}

View File

@ -522,9 +522,10 @@ class Backup:
except NameError: except NameError:
pass pass
else: else:
_notify('Backup finished') try:
_notify('Backup finished')
return 0 except NameError:
pass
def _parse_arguments(): def _parse_arguments():