Skip to content

Restic UI - REST Server Unterstützung

Restic UI
2 1 321
  • Ich nutze zur Datensicherung sehr intensiv den REST-Server von Restic. Da ich ja schon etwas länger an einem Restic UI bastel, wollte ich nun die Feiertage nutzen um das Tool ein wenig umzubauen.

    Es soll dann möglich sein, normal Backups anzulegen oder diese auch auf einem REST-Server abzulegen, zu bearbeiten usw.

    Hier mal der Anfang

  • Die REST Unterstützung ist komplett 🤓

    Ich denke, ein wenig Dokumentation wäre noch gut ☺

  • Portfolio - mein kleines Flask Projekt

    Python3 python flask bootstrap ki-generiert
    5
    0 Stimmen
    5 Beiträge
    388 Aufrufe
    FrankMF
    Hab ChatGPT nochmal nach der Installation auf einem Production Server befragt. ChatGPT Certainly! Here's a short example of the steps you can follow to deploy a Flask application on a production server using Nginx and Gunicorn: Prepare your server: Set up a server (e.g., using a cloud provider like AWS, DigitalOcean, or a dedicated server) and ensure it has a clean, up-to-date installation of a Linux distribution (e.g., Ubuntu or CentOS). Install required software: Install necessary software packages on your server. You'll need Python, pip (Python package manager), Nginx, and Gunicorn. You can use your distribution's package manager (e.g., apt for Ubuntu or yum for CentOS) to install these dependencies. Deploy your Flask application: Copy your Flask application code and any required dependencies to your server. Set up a virtual environment (optional but recommended): Create a virtual environment for your Flask application to isolate its dependencies. You can use venv or virtualenv for this purpose. Install Flask and any required Python packages within your virtual environment: pip install flask Test your Flask application: Ensure your Flask application runs correctly within your server's virtual environment. Configure Gunicorn: Create a Gunicorn configuration file (e.g., gunicorn_config.py) to specify the settings for running your Flask application. Here's a simple example: workers = 4 # Number of Gunicorn worker processes bind = '0.0.0.0:8000' # The address and port Gunicorn should listen on Start Gunicorn: Start Gunicorn with your Flask application: gunicorn -c gunicorn_config.py your_app:app Configure Nginx: Create an Nginx server block (often located in /etc/nginx/sites-available) to define how Nginx should handle incoming requests. Here's a simplified example: server { listen 80; server_name your_domain.com www.your_domain.com; location / { proxy_pass http://127.0.0.1:8000; # Pass requests to Gunicorn proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } Enable the Nginx server block and restart Nginx: sudo ln -s /etc/nginx/sites-available/your_config /etc/nginx/sites-enabled/ sudo nginx -t # Test Nginx configuration sudo systemctl restart nginx Configure your DNS: Point your domain name to your server's IP address. Secure your server (optional but recommended): Set up SSL/TLS certificates for your domain to enable HTTPS. You can use Let's Encrypt for free SSL certificates. Monitor your application: Set up monitoring tools and logs to keep track of your application's performance and troubleshoot any issues. These are the basic steps to deploy a Flask application on a production server with Nginx and Gunicorn. Please note that this is a simplified example, and there are many additional considerations, such as database configuration, security, and optimization, depending on your specific application and requirements. It's also important to keep your server and software up to date and follow security best practices to ensure the stability and security of your production environment. Das werde ich doch mal ausprobieren
  • Ruff - Linting

    Python3 ruff python
    1
    1
    0 Stimmen
    1 Beiträge
    131 Aufrufe
    Niemand hat geantwortet
  • Restic UI - Stand Februar 2023

    PyWebIO restic-ui
    5
    0 Stimmen
    5 Beiträge
    353 Aufrufe
    FrankMF
    Und solltest Du was finden, was kaputt ist, ich freue mich immer über Feedback
  • Restic - 0.15.0 released

    Restic restic restic-ui
    1
    1
    0 Stimmen
    1 Beiträge
    126 Aufrufe
    Niemand hat geantwortet
  • Python - Dict -> JSON und umgekehrt

    Python3 python
    1
    0 Stimmen
    1 Beiträge
    353 Aufrufe
    Niemand hat geantwortet
  • PyQt6 - QSettings

    Python3 python
    3
    0 Stimmen
    3 Beiträge
    508 Aufrufe
    FrankMF
    Möglichkeit 1 Das hier settings = QSettings("Frank_Mankel", "Restic_UI") erzeugt unter /home/frank/.config/Frank_Mankel/Restic_UI.conf die Konfigurationsdatei. Möglichkeit 2 Das hier settings = QSettings("Restic_UI") erzeugt unter /home/frank/.config/Restic_UI.conf die Konfigurationsdatei. Damit habe ich die grundlegenden Dinge, hoffentlich , verstanden. Für den Rest mal in die Dokumentation schauen. Sehr hilfreich war auch mal ein Blick auf die Definition der Klasse. Rechtsklick auf QSettings und dann Go to Definition class QSettings(QObject): class Scope(enum.Enum): UserScope = ... # type: QSettings.Scope SystemScope = ... # type: QSettings.Scope class Format(enum.Enum): NativeFormat = ... # type: QSettings.Format IniFormat = ... # type: QSettings.Format InvalidFormat = ... # type: QSettings.Format class Status(enum.Enum): NoError = ... # type: QSettings.Status AccessError = ... # type: QSettings.Status FormatError = ... # type: QSettings.Status [..gekürzt..]
  • Restic v0.10.0 released

    Restic restic
    2
    0 Stimmen
    2 Beiträge
    286 Aufrufe
    FrankMF
    Gerade erst gelesen, man kann folgendes machen, damit es sich aktualisiert. root@debian:~# restic self-update writing restic to /usr/bin/restic find latest release of restic at GitHub latest version is 0.10.0 download SHA256SUMS download SHA256SUMS.asc GPG signature verification succeeded download restic_0.10.0_linux_amd64.bz2 downloaded restic_0.10.0_linux_amd64.bz2 saved 18378752 bytes in /usr/bin/restic successfully updated restic to version 0.10.0 root@debian:~# restic version restic 0.10.0 compiled with go1.15.2 on linux/amd64 Klasse!
  • Restic & Rclone & Nextcloud

    Linux nextcloud rclone linux restic
    3
    0 Stimmen
    3 Beiträge
    855 Aufrufe
    FrankMF
    Hier mal eine Ausgabe vom ersten Durchgang root@frank-MS-7C37:~# restic --password-file /root/passwd -r rclone:Nextcloud:HOME_UBUNTU backup --files-from /root/includes.txt repository 99xxxxa0 opened successfully, password is correct created new cache in /root/.cache/restic rclone: 2020/05/08 17:47:57 ERROR : locks: error listing: directory not found rclone: 2020/05/08 17:47:58 ERROR : index: error listing: directory not found rclone: 2020/05/08 17:47:58 ERROR : snapshots: error listing: directory not found Files: 3503 new, 0 changed, 0 unmodified Dirs: 2 new, 0 changed, 0 unmodified Added to the repo: 16.872 GiB processed 3503 files, 21.134 GiB in 1:02:56 snapshot fdxxxxec saved Der erste Durchgang hat also etwa eine Stunde benötigt. Durch die Deduplikation der Daten, ist der Vorgang beim zweiten Durchgang viel schneller weil nur neue oder geänderte Daten gesichert werden. Und außerdem sind alle Daten AES-256 verschlüsselt. Also perfekt zur Ablage in irgendeiner Cloud root@frank-MS-7C37:~# restic --password-file /root/passwd -r rclone:Nextcloud:HOME_UBUNTU backup --files-from /root/includes.txt repository 99xxxxa0 opened successfully, password is correct Files: 57 new, 41 changed, 3449 unmodified Dirs: 0 new, 2 changed, 0 unmodified Added to the repo: 22.941 MiB processed 3547 files, 21.137 GiB in 0:13 snapshot c6xxxxe4 saved Wie ihr seht, hat der zweite Durchgang nur ein paar neue und geänderte Daten gesichert. Der Rest ist ja schon vorhanden. Und das kann man dann auch problemlos täglich, wöchentlich oder was auch immer mal eben schnell durchführen. Eines meiner absoluten Lieblingstool