Skip to content

Restic UI - Documentation

Restic UI
  • About

    My second Python3 PyQT5 project

    The project is a UI for the Linux tool restic

    Restic_UI_main_screen.png

    This project is quite far from perfect, but it helped me a lot to understand the world of Python3, VSCodium and gitlab a little bit.

    If it helps someone along the way as well, I'm glad. For questions and suggestions you can write me in my forum

    And now have fun with one of the best backup tools!

    Dependencies

    • restic
    • python3
    • python3-venv
    • pyqt5
    • requests

    Functions Restic-UI

    Restic functions that are included in the UI

    • init
    • backup
    • mount
    • restore
    • snapshots
    • ls
    • check
    • unlock
    • stats
    • prune
    • version

    Installation

    Install restic if not installed

    apt install restic
    restic self-update
    

    Clone Repository

    git clone https://gitlab.com/Bullet64/restic-ui-public.git
    

    Create env

    cd /home/USER/restic-ui-public
    python3 -m venv venv
    source venv/bin/activate
    

    Install dependencies

    pip install PyQt5
    pip install requests
    

    Usage

    python3 restic_ui.py
    

    Known problems

    I am not really satisfied with the programming of the Add Backup, Edit Backup and Settings windows yet. I still have to optimize that.

    The password of a backup is currently stored in plain text! The password field is optional!

    Release is planned for the coming weekend

  • Restic UI - Repo Version

    Restic UI
    1
    0 Stimmen
    1 Beiträge
    81 Aufrufe
    Niemand hat geantwortet
  • Restic v0.13.0 released

    Restic
    1
    0 Stimmen
    1 Beiträge
    96 Aufrufe
    Niemand hat geantwortet
  • Restic UI - QThread

    Restic UI
    1
    0 Stimmen
    1 Beiträge
    95 Aufrufe
    Niemand hat geantwortet
  • Restic UI - User documentation

    Restic UI
    1
    0 Stimmen
    1 Beiträge
    213 Aufrufe
    Niemand hat geantwortet
  • Python3 - QT_QPA_PLATFORM

    Python3
    2
    0 Stimmen
    2 Beiträge
    284 Aufrufe
    FrankMF

    Nachdem ich ja mittlerweile schon lange weder auf Cinnamon bin, hatte ich nach einem Update von VSCodium wieder ein anderes Design. Ok, schauen wir rein.

    (venv) frank@frank-MS-7C37:~/restic-ui-public$ env | grep "QT" QT_ACCESSIBILITY=1 QT_QPA_PLATFORMTHEME=qt5ct

    Wenn ich das auf

    QT_QPA_PLATFORMTHEME=gnome3

    ändere, sieht es wie auf meinem Linux Mint Cinnamon Desktop aus.

  • 0 Stimmen
    3 Beiträge
    330 Aufrufe
    FrankMF

    Kein globalen Variablen mehr im Projekt 🙂

    Das Widget ließ sich relativ einfach erledigen.

    Vorher #----QPlainTextEdit ----# layout = QVBoxLayout() widget = QTextEdit() widget.setReadOnly(True) widget.setLayout(layout) setCentralWidget(widget) Nachher #----QPlainTextEdit ----# layout = QVBoxLayout() self.widget = QTextEdit() self.widget.setReadOnly(True) self.widget.setLayout(layout) self.setCentralWidget(self.widget)

    Aufruf dann nicht mehr mit

    # UI widget.setHtml("")

    sondern mit

    # UI mainWin.widget.setHtml("")

    Problem erledeigt und hoffentlich auch verstanden 😉

  • Python3 - RegEx für ein LineEdit

    Python3
    2
    0 Stimmen
    2 Beiträge
    153 Aufrufe
    FrankMF

    Gut, Menschen die mich kennen, wissen das IPv6 nicht so mein Spezialgebiet ist. Es hilft aber nichts, auch damit muss man sich beschäftigen 🙂

    Es war etwas schwierig was Passendes zu finden, aber ich denke das hier ist ganz gut. Ob es alle Möglichkeiten bei IPv6 beinhaltet, weiß ich nicht zu 100%.

    Hier eine Seite, wo ich was Passendes gefunden habe.
    https://ihateregex.io/expr/ipv6/

    Code # regex für IPv6 reg_ex = QRegExp('^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$') input_validator = QRegExpValidator(reg_ex, self.lineedit2_ipv6) self.lineedit2_ipv6.setValidator(input_validator)

    Ein paar Test von mir ergaben, das es so aussieht als wenn es funktioniert 🙂

  • 0 Stimmen
    2 Beiträge
    209 Aufrufe
    FrankMF

    Dinge entwickeln sich. Es sieht alles schon wieder was anders aus 🙂

    Hauptfenster
    270b5c68-3d64-44ca-9a01-e3f24ba4a26c-grafik.png

    Setup Fenster zum Erstellen der wg0.conf
    27c3cb28-50f5-4e00-b03d-de47c07372a0-grafik.png

    Und alles funktioniert so weit 🤓