BC4 und Linux Mint

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pantoffelheld
    Visitor
    • Jul 2018
    • 5

    BC4 und Linux Mint

    Hallo,
    ich nutze Linux Mint 18.3 und möchte zwei Ordner synchronisieren, einer davon lokal, der andere im Netzwerk (NAS).
    Kann ich BC unter Linux Mint automatisch im Silent-Mode starten, damit die Synchronisation "im Hintergrund" abläuft? Wenn ja, wie?

    ====

    Hello,
    I am using Linux Mint 18.3, and I'd like to synchronize two folders; a local folder, and a folder in a network (NAS).
    Can I start BC automatically in silent mode under Linux Mint to launch the synchronisation "in the background"? If yes, how can I do it?
    Last edited by Gunnar; 02-Jul-2018, 09:42 AM. Reason: GER->ENG translation
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    Hello,

    Yes, but BC4 on Linux always needs Xwindows access, even if it is running silently; it is not a command line only application. I would also strongly suggest testing the sync first in the graphical interface and with test folders. BC4 does not support an Undo, and a silent script offers no Preview. By using the interface first, you can verify the comparison is loading and comparing as you expect, and using test files allows you to verify the script functions as you expect without losing any data. It also let's you test out different Sync methods (Sync Update or Sync Mirror) and choose which one you need for you data. Sync Update copies Newer and Orphan files, and leaves the other files on the Destination alone; Sync Mirror copies anything Not Equal, including overwriting Newer Files in the Destination with Older Files from the Source, and also Deletes Orphans in the Destination.

    Once you know which sync method you need, I can help with the script. It would roughly be:
    load "folder1" "folder2"
    sync update:left->right

    Which you can call from the terminal: bcompare @"script.txt"

    I would also suggest running script without -silent at first, to also verify the task is running as expected, before adding -silent later.

    ===============

    Hallo,

    ja, aber BC4 unter Linux benötigt immer Xwindows-Zugriff, selbst wenn es im Silent-mode läuft; es ist keine reine Befehlszeilenanwendung. Ich würde auch sehr empfehlen, die Synchronisierung zuerst in der grafischen Oberfläche und mit Testordnern zu testen. BC4 unterstützt kein Undo und ein Silent-Skript bietet keine Vorschau. Wenn Du zuerst die Benutzerschnittstelle verwendest, könnest Du überprüfen, ob der Vergleich wie erwartet geladen und verglichen wird, und mithilfe von Testdateien kannst Du die Skriptfunktionen überprüfen wie Du sie erwartest, ohne Daten zu verlieren. Außerdem kannst Du verschiedene Sync-Methoden ausprobieren (Sync-Aktualisieren oder Sync-Spiegeln) und wählen, welche Du für Deine Daten benötigst. Sync-Aktualisierung kopiert neuere und Datei-Singles (Orphans) und lässt die anderen Dateien auf dem Zielort unberührt; Sync-Spiegeln kopiert alles, was nicht gleich ist, einschließlich des Überschreibens neuerer Dateien am Zielort mit älteren Dateien aus der Quelle, und löscht auch Datei-Singles (Orphans) im Zielort.

    Sobald Du weißt, welche Synchronisationsmethode Du benötigst, kann ich Dir bei dem Skript helfen. Es wäre ungefähr:
    load "ordner1" "ordner2"
    sync update:left -> right


    ...welches Du vomTerminal aus aufrufen kannst: bcompare @"script.txt"

    Ich würde auch vorschlagen, das Skript zunächst ohne -silent auszuführen, um auch zu überprüfen, dass die Aufgabe wie erwartet ausgeführt wird, bevor später -silent hinzugefügt wird.
    Last edited by Gunnar; 03-Jul-2018, 01:50 AM. Reason: ENG->GER translation
    Aaron P Scooter Software

    Comment

    • Pantoffelheld
      Visitor
      • Jul 2018
      • 5

      #3
      Ok., vielen Dank.
      Ich habe mir mit Hilfe anderer Threads hier im Forum ein Skript erstellt:
      <ul type="square">
      log verbose "/home/ronald/Schreibtisch/Log_BC4.txt"
      criteria timestamp size
      filter "-*.tmp;-/.*;-*/desktop.ini;-desktop.ini;-Thumbs.db;-SoftMaker/"
      load /home/ronald/Dokumente smb://turbostation/Sync/Dokumente
      sync update:left->right[/list]
      Bei Linux Mint gibt es die Möglichkeit, Startprogramme zu definieren. In der Auswahl der Anwendungen bekomme ich auch Beyond Comare angeboten. Somit ließe sich BC bei jedem Login automatisch starten. Den Aufruf von BC als Startprogramm würde ich wie folgt realisieren:
      bcompare @/home/ronald/Schreibtisch/skript.txt -silent
      Würde das so funktionieren? Ich hab's noch nicht ausprobiert... Wenn ich es probiere, dann natürlich zunächst ohne den Schalter -silent.

      Ronald

      ================

      Okay, thank you very much.
      I have created a script with the help of other threads in this forum:

      [see above]

      Under Linux Mint it is possible to define start programs. In the selection of applications, Beyond Compare is also displayed. Thus BC could be started automatically during each login. I would call BC as a start program as follows:

      [see above]

      Will this work? I have not tried it yet. If I try it I would try it without the -silent switch of course.

      Ronald
      Last edited by Gunnar; 05-Jul-2018, 01:08 AM. Reason: GER-ENG translation

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16002

        #4
        Before running the script, I suggest loading your two folders in the graphical interface by copying/pasting the folder path text into the base folder paths, then also copy the filter text into the filter toolbar (right above the base folder paths in the main interface). This will let you see if the filter is filtering the items you expect. For example, you filter out desktop.ini on the base folder level, and one level deep, but not two levels deep. For arbitrary depth, you want -.\...\desktop.ini

        Once your filter is set correctly, you can also verify that the remaining items are aligning and comparing as you expect, and you can even preview the sync items using the Actions menu -> Synchronize -> Update Left to Right

        Assuming that looks good, you can transition to script run on the Terminal. Once you know the script runs as a manual task, that's when I would test with the On Start option. I haven't used this exact option, but it will need to have access to your user's .config/bcompare settings location and run "as your user account".

        And, after this is successful, then add -silent as the last step.

        ======================

        Vor dem Ausführen des Skripts empfehle ich, Deine zwei Ordner in die grafische Benutzeroberfläche zu laden, indem Du den Ordnerpfad in die Basisordnerpfade kopierst/einfügst und dann den Filtertext in die Filtersymbolleiste kopierst (direkt über den Basisordnerpfaden in der Hauptoberfläche). Auf diese Weise siehst Du, ob der Filter die erwarteten Elemente filtert. Beispielsweise filterst Du die Datei desktop.ini auf der Ebene des Basisordners und eine Ebene tiefer, aber nicht zwei Ebenen tief.
        Für eine beliebige Tiefe nutzt Du -.\...\desktop.ini

        Sobald Dein Filter richtig eingestellt ist, kannst Du überprüfen, ob die verbleibenden Elemente wie erwartet ausgerichtet und verglichen werden, und Du kannst sogar eine Vorschau der Synchronisierungselemente über das Menü "Aktionen" -> "Synchronisieren" -> "Von links nach rechts aktualisieren" anzeigen lassen.

        Angenommen, das sieht gut aus, kannst Du zu einem Skript wechseln, das im Terminal ausgeführt wird. Sobald Du weißt, dass das Skript wie die manuelle Aufgabe ausgeführt wird, würde ich es mit der Beim-Start-Option testen. Ich habe diese Option nicht exakt verwendet, aber es muss Zugriff auf den Konfigurationsspeicherort Deines Benutzers haben ".config/bcompare" und als Dein Benutzerkonto ausgeführt werden.

        Und nachdem dies erfolgreich ist, kannst Du -silent als letzten Schritt hinzufügen.


        ===================

        Update:
        I should add that our script files are plain text, and wouldn't include:
        "<ul type="square">"
        "[/list]
        "

        unless you are adding this as a workaround a larger scripting solution that won't pass this text into BC4.

        ==================

        Nachtrag:
        Ich sollte hinzufügen, dass unsere Skriptdateien reine Texte sind und Folgendes nicht enthalten:
        "<ul type =" Quadrat ">"
        "[/Liste]"
        Es sei denn Du brauchst dies als Workaround einer größeren Skript-Lösung, die diesen Text nicht nach BC4 übermittelt.
        Last edited by Gunnar; 05-Jul-2018, 11:04 AM. Reason: ENG->GER translation
        Aaron P Scooter Software

        Comment

        • Pantoffelheld
          Visitor
          • Jul 2018
          • 5

          #5
          Ich bin gerade beim Testen des Skripts. Dabei fiel auf, dass Dateien, die im Zielordner gelöscht wurden, erneut vom Startordner in den Zielordner kopiert werden. Ich hätte aber gern, dass die gelöschten Dateien bei der nächsten Synchronisation auch im Startordner gelöscht werden. Gibt es dafür eine Möglichkeit?

          Ok., ich versuchs mal selber:

          ===================

          I'm currently testing the script. It was noticeable that files that were deleted in the destination folder are copied again from the start folder to the destination folder. I would like, however, that the deleted files in the next sync in the start folder are deleted. Is there a possibility for that?
          Last edited by Pantoffelheld; 07-Jul-2018, 03:29 PM.

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 16002

            #6
            Hello,

            Sync Update would not delete files in the Destination side. Could you post your full script.txt?

            ===============

            Hallo,

            Sync-Aktualisieren löscht keine Dateien auf der Zielseite. Kannst Du das vollständige script.txt posten?
            Last edited by Gunnar; 10-Jul-2018, 02:23 AM. Reason: ENG->GER translation
            Aaron P Scooter Software

            Comment

            • Pantoffelheld
              Visitor
              • Jul 2018
              • 5

              #7
              Die skript.txt sieht so aus:
              log verbose "/home/ronald/Schreibtisch/Log_BC4.txt"
              criteria timestamp size
              filter "-*.tmp;-/.*;-.\...\desktop.ini;-Thumbs.db;-SoftMaker/"
              load /home/ronald/Dokumente smb://turbostation/Sync/Dokumente
              sync update:left->right

              Comment

              • Aaron
                Team Scooter
                • Oct 2007
                • 16002

                #8
                Hello,

                Ok, if a file is deleted in smb://turbostation/ outside of BC4, and then you run the sync, this will be found as a difference (Orphan exists on Source /home/ronald/) and will copy the file to the smb://. The load command does not track deletes. As it loads and compares, it finds files that exist on the Left side (newly created, or deleted right) and will copy those files.

                ==================

                Hallo,

                Ok, wenn eine Datei in smb://turbostation/ außerhalb von BC4 gelöscht wird, und Du dann die Synchronisierung ausführst, wird dies als ein Unterschied festgestellt (Datei-Single [Orphan] existiert in Quellpfad /home/ronald/) und kopiert die Datei nach smb://. Der Ladebefehl verfolgt keine Löschvorgänge. Beim Laden und Vergleichen werden Dateien gefunden, die auf der linken Seite vorhanden sind (neuerstellte oder rechts gelöschte) und wird diese Dateien kopieren.
                Last edited by Gunnar; 13-Jul-2018, 01:21 AM. Reason: ENG->GER translation
                Aaron P Scooter Software

                Comment

                • Pantoffelheld
                  Visitor
                  • Jul 2018
                  • 5

                  #9
                  Schade, dann nützt mir die Software nichts.
                  Dankeschön.

                  ==================

                  Too bad, then the software does not help me.
                  Thank you very much.

                  Comment

                  Working...