Skip to content

Restic UI - Documentation

Restic UI
1 1 349
  • 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 - Vorstellung Part 2

    Restic UI restic-ui
    1
    0 Stimmen
    1 Beiträge
    164 Aufrufe
    Niemand hat geantwortet
  • Restic UI - QtWaitingSpinner unexpected type 'float'

    Restic UI restic-ui python3
    2
    0 Stimmen
    2 Beiträge
    312 Aufrufe
    FrankMF
    Der Autor hat meine Anpassungen um ein paar Änderungen erweitert und in sein Repo eingepflegt. Der QtWaitingSpinenr ist jetzt auch 3.10 kompatibel [image: 1641634993220-1b268980-92ca-42a4-89a0-a6e4b7ab9378-grafik.png]
  • PyQt5 - QThread

    Python3 pyqt5 python3
    3
    0 Stimmen
    3 Beiträge
    287 Aufrufe
    FrankMF
    Und hier mal ein komplettes Beispiel. class Worker Wir legen den Worker an, das ist der Prozess der die Arbeit macht und etwas länger braucht. class Worker(QObject): """ Worker Class for Rest function stats""" stats_finished = pyqtSignal(str) stats_error = pyqtSignal(str) def __init__(self): super().__init__() def run(self): # Restic function try: # long running task except Exception: # Process don't successful, send signal self.stats_error.emit(result.stderr) else: # Process successful, send signal self.stats_finished.emit(result.stdout) finally: pass in class MainWindow class MainWindow(QMainWindow): def __init__(self): super().__init__() "First Thread with documentation" # Worker for restic_stats # Create a QThread object self.thread = QThread() # Create a worker object self.worker1 = Worker() # Move worker to the thread self.worker1.moveToThread(self.thread) # Connect signals and slots self.thread.started.connect(self.worker1.run) self.worker1.stats_finished[str].connect(self.restic_stats_finished) self.worker1.stats_error[str].connect(self.restic_stats_error) "First thread end" ############################################### # Process for restic_stats is finished ############################################### @pyqtSlot(str) def restic_stats_finished(self, i): # Signal from worker thread without an error Spinner.stop(self) self.thread.quit() ############################################### # Process for restic_stats when get an error ############################################### @pyqtSlot(str) def restic_stats_error(self, i): # Signal from worker thread with an error! Spinner.stop(self) Funktion restic_stats def restic_stats(self): # we start the worker thread self.thread.start() # we start waitingspinnerwidget Spinner.start(self) Ich wollte gerade schreiben, das folgendes sehr wichtig ist self.thread.quit() da fällt mir ein Fehler auf. Kurz ausprobiert und bingo, wenn der Prozess einen Error triggert, muss natürlich auch der Prozess beendet werden. Wenn man das nicht macht, macht das Programm nicht das was es soll. Der Grund ist, das der Prozess einfach immer weiter läuft. Er MUSS beendet werden. Ich gehe dann mal in meinem Programm alles ändern Ok, jetzt geht die Funktion auch zweimal hintereinander und gibt auch ordentlich den Fehler aus. Fazit Ich habe wieder sehr viel gelernt und hoffe das ich es auch richtig verstanden habe Hoffe das es dem ein oder anderen Anfänger hilft. Und falls hier ein Profi mitliest und hier Blödsinn steht bitte ich um einen Kommentar, damit ich das ändern kann. Es steht schon genug Blödsinn im Netz
  • Django - Webframework

    Python3 django python3
    1
    2
    0 Stimmen
    1 Beiträge
    147 Aufrufe
    Niemand hat geantwortet
  • Python3 - QSettings

    Python3 python3
    1
    0 Stimmen
    1 Beiträge
    187 Aufrufe
    Niemand hat geantwortet
  • Restic UI - mein zweites Python3 Projekt

    Python3 pyqt5 restic python3
    5
    0 Stimmen
    5 Beiträge
    889 Aufrufe
    FrankMF
    @berthold Hallo Berthold. Ich bin eigentlich immer noch nicht mit meinem Code zufrieden. Ist man das jemals? Da ich auch noch ein kleines Problem habe, würde ich da ungerne jemanden reinschauen lassen. Der Code ist stellenweise in deutsch kommentiert, stellenweise in englisch. Kennt man ja, man will es irgendwann mal ordentlich machen und dann kommt das nächste Problem auf einen zu. Hast Du Python3 Vorkenntnisse? Wenn Du "brennend" dran interessiert bist, könnte ich Dir evt. Zugang zu meinem Gitlab-Projekt geben. Wenn Du interessiert bist und ich dich nicht los werde :), dann schreib mir eine PN.
  • Python3 - zwei Webseiten als Empfehlung

    Python3 pyqt5 python3
    1
    0 Stimmen
    1 Beiträge
    200 Aufrufe
    Niemand hat geantwortet
  • Wichtige Links

    Angeheftet Python3 python3
    1
    0 Stimmen
    1 Beiträge
    220 Aufrufe
    Niemand hat geantwortet