Skip to content

zfs-snap-manager and "Got invalid schema for dataset" or not deleted old snapshots or not created new snapshots

I am using the zfs-snap-manager for such a long time that I never ever had a look on it since years.

I've just created zfs pools and zfs snap manager configurations without thinking or checking it for a while now. But once upon a time I wanted to check the behaviour and found out that some configured snapshots where not made.

After a while I saw that my assumption was false, so the error was in front of the display :-).

My configuration for the section schema was simplified to 7d because all I wanted for a dataset was that I can go back the last seven days. After finding the log file (/var/log/zfs-snap-manager.log) and tailing it, I quickly saw the log message Got invalid schema for dataset .... Just a bit more investigation and I found out that I have to provide a fully defined schema like 7d0w0m0y. After adapting all available configuration files on all hosts, the zfs-snap-manager is working as expected.

I found an existing feature request to "relaxed" the schema interpretion and stumpled over another feature request asking for creating unittests. So I've forked it and will try to learn python by fixing the issue on my own.

  • migrate code to python3
  • write unittests
  • implement relaxed handling of schema with default values

Do you want to join? Contact me if you want to.

Translate to de es fr it pt ja

Nextcloud Client 3.0.1 on Linx >> there are unresolved conflicts<<

As written in the official issue ticket, following the way how to solve your conflict locally.

A quick update to figure out the conflicted files. cd into your nextcloud synchronized path

#list conflicted files 
find . -iname *conflic* -type f

You can than decide which file is the one you want to keep foo.bar or foo (conflicted copy 2020-09-09 083407).bar.

See also here and here.

Translate to de es fr it pt ja

Check which version and fix pack of your HCL Notes / IBM Notes is installed

Today I needed to create a skript that automatically installes a Notes FP (Fix-Pack) to all our clients.

The windows registry, as example, does not tell which of if there is a FP installed. After a while, my current solution is to check which value the variable FaultRecovery_Build inside the notes.ini is containing.

#pseudo code
$fp5IsInstalled = (cat notes.ini | grep -q "Release 10.0.1FP5")
If ($fp5IsInstalled) {
    //... do something or nothing
}

Hope this helps.

Translate to de es fr it pt ja

Powershell - Compare file hash with existing hash file (checksum, SHA1) to validate binary file integrity

A quick win you should add to your power shell scripts whenever you execute a binary file by doing an integrity check based on checksums.

$pathToBinaryFile = "/your/file.path"
$pathToSha1File = $($pathToBinaryFile + ".sha1")

If (test-path $pathToBinaryFile) {
    $calculatedFileHash = Get-FileHash -LiteralPath $pathToBinaryFile -Algorithm SHA1
    $sha1FileContent = Get-Content $pathToSha1File 

    Write-Host ":: Checking file integrity."
    #we are expecting a sha1 file with one line of content.
    #   this one line should look like:<file name>\t<sha1 sum>
    #we are exploding the expected content by " "
    #   first array entry is <file name>
    #   second array entry is \t
    #   third array entry is <sha1 sum>
    $expectedFileHash = $sha1FileContent.Split(" ")[2]

    If ($expectedFileHash -ne $calculatedFileHash.HASH) {
        Write-Host $("   Binary file integrity check failed. Expected checksum >>" + $expectedFileHash + "<<, current checksum >>" + $calculatedFileHash.HASH + "<<.")
    }
}

A bit more advanced script can be found here in my examples collection.

Translate to de es fr it pt ja