Menu

Is there a way to know what files did "sync" actually synced without "diff"?

Help
Mio
2023-12-31
2024-01-03
  • Mio

    Mio - 2023-12-31

    I could use "diff" command to know what "sync" will sync but it would be inaccurate if I am adding files to the disk while I am running these two commands.
    I would like the "sync" command having an output like "diff".

     
    • David

      David - 2023-12-31

      Why would you add files to the disk while syncing? I could be wrong, but I don't think the files added during syncing would sync.

       
      • Leifi Plomeros

        Leifi Plomeros - 2024-01-01

        I think it is this scenario:
        1. Add some files
        2. Snapraid diff >Logfile.txt
        3. Add additional files
        4. Snapraid sync
        5. Additional files not in Logfile.txt and not in future snapraid diff because it is already synced :(

        Snapraid list would seem like a good alternative in any scenario where above would be an actual problem.

         
        • Mio

          Mio - 2024-01-01

          I think this procedure would work if I don't want to change code of snapraid! Thanks

           
        • David

          David - 2024-01-01

          If he wants that, then use a batch file. That's what I do. I run a batch file that does a status, then diff, then sync.

           
      • Mio

        Mio - 2024-01-01

        Because I want to keep my home server running while syncing

         
        • Leifi Plomeros

          Leifi Plomeros - 2024-01-01

          As mentioned by David. Files added during sync will simply be ignored until next sync.

          The only thing you should not be doing is to delete or modify existing files while sync is running.

           
  • Mio

    Mio - 2024-01-02

    Since sync is often used together with diff, it would be great if snapraid could have a diff-sync subcommand that only scans the disk once and doesn't have inconsistency if files are added between diff and sync

     
    • David

      David - 2024-01-02

      Use a batch file. It's that simple.

       
      • Mio

        Mio - 2024-01-03

        It won't be simple if I want to deal with added files between diff and sync automatically

         
        • David

          David - 2024-01-03

          What is your process? What are you trying to accomplish? If you run a batch file, sync will run milliseconds after the diff.

           

Log in to post a comment.