Skip to content

Restic UI - User documentation

Restic UI
  • File menu

    Load file

    For each backup we store the following data in a JSON file.

    Backup Data

    • name
    • repository
    • source
    • password (*)
    • init
    • exclude (*)

    REST Data

    • REST Domain
    • REST Port
    • REST User
    • REST Password
    • REST Folder

    (*) optional

    Data Explanation
    BACKUP DATA
    name The name of the backup, this name must be unique
    repository The path of the backup
    source The path of the data to be saved
    password The Restic password used to encrypt the data
    init Status whether the backup has already been initialized. 1 = done 0 = not done
    exclude Path to exclude.txt
    REST DATA
    REST Domain Domain from REST-server example.com
    REST Port Port from REST-server
    REST User username from HTTP-user
    REST Password password from HTTP-user
    REST Folder Folder on REST-server for storing backup

    Open Repo (since 1.5.1)

    Every now and then I have a repo lying around here somewhere that I want to take a look at. Comes very often from testing. I want to take a look before I delete it.

    • For opening the repo the password is needed.
    • The data of the repo is attached to the backup_list.json.

    Now you can look inside, list snapshots and so on.

    What you can't do is a new backup. For that the source would have to be set first.

    Add backup

    Here we can create and save a backup

    cf27bad9-0435-4051-ba40-2ef14ee63603-image.png

    Edit backup

    Here we can edit and save a backup

    cdde6f32-af6b-4e30-a39c-30f6b9af5d3c-image.png

    1b103470-2aba-4bc7-b03d-c71d53f161db-image.png

    Delete backup

    With this menu we can delete a backup AND it's data!

    Restic menu

    Init

    We will use this restic command

    restic -r /home/frank/restic_test/ init
    

    Backup

    We will use this restic command

    restic -r /home/frank/restic_test/ backup /home/frank/Bilder --exclude-file=excludes.txt
    

    Mount

    We will use this restic command

    restic -r /home/frank/restic_test/ mount /tmp/restic
    

    UMount

    We will use this command

    umount mount_path
    

    Restore

    We will use this restic command

    restic -r /srv/restic-repo restore <ID> --target /tmp/restore-work
    

    You will be ask for a snapshot <ID>. Use Tools/Snapshots and copy and paste the <ID>

    Tools menu

    Snapshots

    We will use this restic command

    restic -r /home/frank/restic_test/ snapshots
    

    Example output

    reading repository password from stdin
    ID        Time                 Host           Tags        Paths
    ----------------------------------------------------------------------------
    af5080e4  2021-08-04 21:22:10  frank-MS-7C37              /home/frank/Bilder
    ----------------------------------------------------------------------------
    1 snapshots
    

    List Snapshot

    We will use this restic command

    restic -r /home/frank/restic_test/ ls <ID>
    

    Example output

    reading repository password from stdin
    snapshot af5080e4 of [/home/frank/Bilder] filtered by [] at 2021-08-04 21:22:10.320165238 +0200 CEST):
    /home
    /home/frank
    /home/frank/Bilder
    /home/frank/Bilder/20210603_161.zip
    /home/frank/Bilder/20210603_161548.jpg
    /home/frank/Bilder/20210603_161601.jpg
    /home/frank/Bilder/20210721_140856.jpg
    /home/frank/Bilder/20210722_101305.jpg
    /home/frank/Bilder/Bildschirmfoto vom 2021-06-15 17-39-09.png
    /home/frank/Bilder/Bildschirmfoto vom 2021-06-24 18-48-52.png
    /home/frank/Bilder/Bildschirmfoto vom 2021-06-24 18-49-55.png
    /home/frank/Bilder/Cinebar
    ............
    

    Check

    We will use this restic command

    restic -r /home/frank/restic_test/ check
    

    Unlock

    We will use this restic command

     restic -r /home/frank/restic_test/ unlock
    

    Stats

    We will use this restic command

    restic -r /home/frank/restic_test/ stats
    

    Prune

    We will use this restic command

    restic -r /home/frank/restic_test/ forget --keep-last 3 --keep-monthly 3 --prune
    

    Version

    We will use this command

    restic version
    

    Settings

    Here you can store

    Tab Encryption

    crypt.png

    Tab Paths

    • home path
    • source path
    • exclude list
    • Key Path

    path.png

    Tab Restic Settings

    Here we can set some restic parameters

    • check --read-data subset 75%

    Then restic will only load 75% from data to check

    • prune keep last (0 - 9)
    • prune keep monthly (0 - 12)

    --keep-last n never delete the n last (most recent) snapshots
    --keep-monthly n for the last n months which have one or more snapshots, only keep the last one for that month.
    Quelle: https://restic.readthedocs.io/en/latest/060_forget.html

    restic.png

    Migrate menu

    Since restic version 0.14.0 compression has been added.

    The repo format has changed.

    There is the restic migrate command to migrate old repos V1 to V2.

    For this there is a new menu 'Migrate' with two commands

    migrate check and migrate update

    Migrate Check

    Migrate check will show available migrations for the repo.

    Migrate Update

    Attention. I am using

    export RESTIC_PASSWORD="I9n7G7G0ZpDWA3GOcJbIuwQCGvGUBkU5"
    

    because migrate update expects a password entry twice.

    Migrate Update will change repo version from V1 to V2. No data will be compressed, only with a new backup the data will be saved compressed.

    For more infos read -> https://linux-nerds.org/topic/1257/restic-ui-migrate

    Help menu

    About Restic UI

    2e1aff87-1541-473f-affa-ccbbcccf5028-image.png

    Restic documentation

    Restic documentation you can read here

    Translated with www.DeepL.com/Translator (free version)

  • Restic v0.13.0 released

    Restic
    1
    0 Stimmen
    1 Beiträge
    95 Aufrufe
    Niemand hat geantwortet
  • Restic UI - auf PyQt6 umbauen

    Restic UI
    5
    0 Stimmen
    5 Beiträge
    184 Aufrufe
    FrankMF

    Ich hatte im Python Forum mal um Hilfe gebeten und man hat mir einen Hinweis gegeben, dem ich hier mal nachgehe.

    Der Forenuser meinte, das es ihn wundern würde, wenn ich von QtCore importieren müsste, also

    self.addDockWidget(QtCore.Qt.DockWidgetArea.RightDockWidgetArea, self.items)

    Das habe ich mal ausprobiert. Wenn ich von QtCore Qt importiere, kann ich das QtCore weglassen.

    from PyQt6.QtCore import QSettings, Qt

    dann geht auch

    self.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.items)

    Es sieht so aus, das ich mich in dieses Thema noch ein wenig einarbeiten muss 🙂

  • 0 Stimmen
    2 Beiträge
    207 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 🤓

    1b268980-92ca-42a4-89a0-a6e4b7ab9378-grafik.png

  • PyQt5 - QThread

    Python3
    3
    0 Stimmen
    3 Beiträge
    140 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 🙂

  • Restic UI - Released

    Restic UI
    1
    0 Stimmen
    1 Beiträge
    141 Aufrufe
    Niemand hat geantwortet
  • 0 Stimmen
    3 Beiträge
    302 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 - PyQt5 Layout

    Python3
    1
    0 Stimmen
    1 Beiträge
    147 Aufrufe
    Niemand hat geantwortet
  • Python3 - zwei Webseiten als Empfehlung

    Python3
    1
    0 Stimmen
    1 Beiträge
    168 Aufrufe
    Niemand hat geantwortet