mirror of https://github.com/borgbase/vorta
Improve packaging
This commit is contained in:
parent
a9d01a4db4
commit
6e4fcb9583
|
@ -4,8 +4,7 @@ commit = True
|
|||
tag = True
|
||||
|
||||
[bumpversion:file:Makefile]
|
||||
|
||||
[bumpversion:file:setup.cfg]
|
||||
[bumpversion:file:vorta.spec]
|
||||
|
||||
[bumpversion:file:src/vorta/_version.py]
|
||||
|
||||
|
|
|
@ -7,3 +7,5 @@ docs/
|
|||
bin/
|
||||
__pycache__
|
||||
Makefile
|
||||
.eggs
|
||||
vorta.egg-info
|
||||
|
|
64
README.md
64
README.md
|
@ -2,31 +2,50 @@
|
|||
|
||||
![](https://files.qmax.us/vorta-screencast-2.gif)
|
||||
|
||||
[Vorta](http://memory-alpha.wikia.com/wiki/Vorta) is a GUI for [BorgBackup](https://borgbackup.readthedocs.io). It's in alpha status and currently has the following features:
|
||||
Vorta is a macOS/Linux GUI for [BorgBackup](https://borgbackup.readthedocs.io). It's currently in alpha status.
|
||||
|
||||
- [x] Select and create SSH keys without using the Terminal
|
||||
- [x] Securely save repo password in Keychain.
|
||||
- [x] Initialize new remote Borg repositories
|
||||
- [x] Create new Borg snapshots (backups) from local folders
|
||||
- [x] Mount existing snapshots with FUSE
|
||||
- [x] Settings stored in sqlite
|
||||
- [x] Exclude options/patterns.
|
||||
- [x] Rule-based scheduling by time, Wifi SSID, etc.
|
||||
- [x] Scheduling for background backups.
|
||||
- [x] Tests (partly)
|
||||
## Main features
|
||||
|
||||
Missing features:
|
||||
- Encrypted, deduplicated and compressed backups to remote repositories
|
||||
- Works with any remote SSH account that has `borg` installed. Or try [BorgBase](https://www.borgbase.com) for advanced features like append-only repositories and monitoring.
|
||||
- Add SSH keys and initialize repos directly from the GUI
|
||||
- Repo keys are securely stored in macOS Keychain, Secret Service or KWallet
|
||||
- Mount existing snapshots via FUSE
|
||||
- Flexible scheduling for automatic background backups.
|
||||
- View a list of snapshots and action logs
|
||||
- Exclude options/patterns.
|
||||
|
||||
Missing features: (PRs welcome)
|
||||
|
||||
- [ ] Repo pruning
|
||||
- [ ] Repo checking
|
||||
- [ ] Full test coverage
|
||||
- [ ] Packaging for Linux
|
||||
|
||||
## Download
|
||||
## Installation and Download
|
||||
### macOS
|
||||
The app package under [Releases](https://github.com/borgbase/vorta/releases) should include everything. Just download, unzip and run.
|
||||
|
||||
## Development
|
||||
Conda is used for dependency management. Create a new virtual env using:
|
||||
### Linux
|
||||
No package yet. First install Borg's own [dependencies](https://borgbackup.readthedocs.io/en/stable/installation.html#dependencies). Then install via
|
||||
```
|
||||
$ conda env create environment.yml
|
||||
$ pip install vorta
|
||||
```
|
||||
|
||||
After installation run with the `vorta` command.
|
||||
```
|
||||
$ vorta
|
||||
```
|
||||
|
||||
## Development
|
||||
Install in development mode:
|
||||
```
|
||||
$ pip install -e .
|
||||
```
|
||||
|
||||
Then run via
|
||||
```
|
||||
$ vorta
|
||||
```
|
||||
|
||||
Qt Creator is used to edit views. Install using Homebrew and then open the .ui files in `vorta/UI`:
|
||||
|
@ -35,19 +54,20 @@ $ brew cask install qt-creator
|
|||
$ brew install qt
|
||||
```
|
||||
|
||||
To run directly:
|
||||
```
|
||||
PYTHONPATH=src python -m vorta
|
||||
```
|
||||
|
||||
To build a binary package:
|
||||
```
|
||||
$ pyinstaller --clean --noconfirm vorta.spec
|
||||
```
|
||||
|
||||
### Testing (work in progress)
|
||||
Tests are in the folder `/tests`. Run them with `PYTHONPATH=src pytest`. Testing happens at the level of UI components. Calls to `borg` are mocked and can be replaced with some example json-output.
|
||||
Tests are in the folder `/tests`. Testing happens at the level of UI components. Calls to `borg` are mocked and can be replaced with some example json-output. To run tests:
|
||||
```
|
||||
$ python setup.py test
|
||||
```
|
||||
|
||||
## Privacy Policy
|
||||
- No personal data is ever stored or transmitted by this application.
|
||||
- During beta, crash reports are sent to [Sentry](https://sentry.io) to quickly find bugs.
|
||||
|
||||
## Why the Name?
|
||||
[Vorta](http://memory-alpha.wikia.com/wiki/Vorta) are a race referenced in Star Trek. They serve the Dominion and are replaced by their clones if they die. Just like our backups.
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
name: vorta
|
||||
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
|
||||
dependencies:
|
||||
- python=3.6.6
|
||||
- pyinstaller
|
||||
|
||||
- pip:
|
||||
- appdirs
|
||||
- paramiko
|
||||
- pyqt5
|
||||
- peewee
|
||||
- python-dateutil
|
||||
- keyring
|
||||
- pytest
|
||||
- pytest-qt
|
||||
- pytest-mock
|
62
setup.cfg
62
setup.cfg
|
@ -1,4 +1,66 @@
|
|||
[metadata]
|
||||
name = vorta
|
||||
author = Manuel Riel
|
||||
description = A GUI for BorgBackup
|
||||
version = 0.2.0
|
||||
url = https://github.com/borgbase/vorta
|
||||
keywords =
|
||||
backup
|
||||
borgbackup
|
||||
classifiers =
|
||||
Development Status :: 3 - Alpha
|
||||
Environment :: MacOS X
|
||||
Environment :: X11 Applications :: Qt
|
||||
Operating System :: MacOS
|
||||
Operating System :: POSIX
|
||||
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
Topic :: System :: Archiving :: Backup
|
||||
Topic :: System :: Systems Administration
|
||||
Topic :: Utilities
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
license_file = LICENSE.txt
|
||||
|
||||
[aliases]
|
||||
test=pytest
|
||||
|
||||
[options]
|
||||
python_requires = >= 3.6
|
||||
setup_requires =
|
||||
setuptools >= 38.6
|
||||
pip >= 10
|
||||
pytest-runner
|
||||
setuptools_git
|
||||
include_package_data = True
|
||||
find_packages =
|
||||
exclude = tests
|
||||
install_requires =
|
||||
appdirs
|
||||
paramiko
|
||||
pyqt5
|
||||
peewee
|
||||
python-dateutil
|
||||
keyring
|
||||
borgbackup
|
||||
|
||||
[options.extras_require]
|
||||
tests =
|
||||
pytest
|
||||
pytest-qt
|
||||
pytest-mock
|
||||
mypy
|
||||
mypy-extensions
|
||||
|
||||
[options.entry_points]
|
||||
gui_scripts =
|
||||
vorta = vorta.__main__
|
||||
|
||||
|
||||
[tool:pytest]
|
||||
addopts = -s
|
||||
testpaths = tests
|
||||
qt_default_raising = true
|
||||
filterwarnings =
|
||||
ignore::DeprecationWarning
|
||||
|
|
|
@ -2,19 +2,15 @@ import sys
|
|||
import os
|
||||
import peewee
|
||||
|
||||
import vorta.models
|
||||
from vorta.application import VortaApp
|
||||
from vorta.config import SETTINGS_DIR
|
||||
|
||||
# Send crashes to Sentry
|
||||
if getattr(sys, 'frozen', False):
|
||||
import sentry_sdk
|
||||
sentry_sdk.init("https://a4a23df3e44743d5b5c5f06417a9a809@sentry.io/1311799")
|
||||
|
||||
# Ensures resource file in icons-folder is found
|
||||
from vorta.utils import get_asset
|
||||
sys.path.append(os.path.dirname(get_asset('icons/collection.rc')))
|
||||
|
||||
import vorta.models
|
||||
from vorta.application import VortaApp
|
||||
from vorta.config import SETTINGS_DIR
|
||||
|
||||
# Init database
|
||||
sqlite_db = peewee.SqliteDatabase(os.path.join(SETTINGS_DIR, 'settings.db'))
|
||||
vorta.models.init_db(sqlite_db)
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Needs Borg installed server-side. Or try <a href="https://www.borgbase.com"><span style=" text-decoration: underline; color:#0000ff;">BorgBase.</span></a> 100GB free during Beta.</p></body></html></string>
|
||||
<string><html><head/><body><p>SSH account with Borg installed server-side. Also try <a href="https://www.borgbase.com"><span style=" text-decoration: underline; color:#0000ff;">BorgBase.</span></a> 100GB free during Beta.</p></body></html></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
|
|
|
@ -11,7 +11,7 @@ from ..borg_runner import BorgThread
|
|||
|
||||
|
||||
uifile = get_asset('UI/mainwindow.ui')
|
||||
MainWindowUI, MainWindowBase = uic.loadUiType(uifile)
|
||||
MainWindowUI, MainWindowBase = uic.loadUiType(uifile, from_imports=True, import_from='vorta.views')
|
||||
|
||||
|
||||
class MainWindow(MainWindowBase, MainWindowUI):
|
||||
|
|
|
@ -4,7 +4,7 @@ from ..utils import get_asset, get_sorted_wifis
|
|||
from ..models import EventLogModel, WifiSettingModel, BackupProfileMixin
|
||||
|
||||
uifile = get_asset('UI/scheduletab.ui')
|
||||
ScheduleUI, ScheduleBase = uic.loadUiType(uifile)
|
||||
ScheduleUI, ScheduleBase = uic.loadUiType(uifile, from_imports=True, import_from='vorta.views')
|
||||
|
||||
|
||||
class ScheduleTab(ScheduleBase, ScheduleUI, BackupProfileMixin):
|
||||
|
|
Loading…
Reference in New Issue