ZnapZend plugin for unRAID


steini84

Recommended Posts

Hello!

 

I've installed the plugin for someone else, now on his unraid 6.3 we dont see any snapshots that are created by znapzend.

Reinstalling did not help.

 

*** backup plan: HDD ***
         enabled = on
         mbuffer = off
    mbuffer_size = 1G
   post_znap_cmd = off
    pre_znap_cmd = off
       recursive = on
             src = HDD
        src_plan = 24hours=>2hours,7days=>1day,30days=>7days,90days=>30days
        tsformat = %Y-%m-%d-%H%M%S
      zend_delay = 0

*** backup plan: NVME ***
           dst_0 = HDD/Backup/NVME
      dst_0_plan = 1day=>6hours
         enabled = on
         mbuffer = off
    mbuffer_size = 1G
   post_znap_cmd = off
    pre_znap_cmd = off
       recursive = on
             src = NVME
        src_plan = 24hours=>2hours,7days=>1day,30days=>7days,90days=>30days
        tsformat = %Y-%m-%d-%H%M%S
      zend_delay = 0

 

I've executed after creating:

pkill -HUP znapzend

Please advise.

Link to comment
Hello!   I've installed the plugin for someone else, now on his unraid 6.3 we dont see any snapshots that are created by znapzend. Reinstalling did not help.  

 

 

 

 

*** backup plan: HDD ***        enabled = on        mbuffer = off   mbuffer_size = 1G  post_znap_cmd = off   pre_znap_cmd = off      recursive = on            src = HDD       src_plan = 24hours=>2hours,7days=>1day,30days=>7days,90days=>30days       tsformat = %Y-%m-%d-%H%M%S     zend_delay = 0*** backup plan: NVME ***          dst_0 = HDD/Backup/NVME     dst_0_plan = 1day=>6hours        enabled = on        mbuffer = off   mbuffer_size = 1G  post_znap_cmd = off   pre_znap_cmd = off      recursive = on            src = NVME       src_plan = 24hours=>2hours,7days=>1day,30days=>7days,90days=>30days       tsformat = %Y-%m-%d-%H%M%S     zend_delay = 0

 

I've executed after creating:

 

 

 

 

 

pkill -HUP znapzend

Please advise.

 

 

 

 

 

Znapzend runs on an interval, in your case every 2 hours for the 24 hour retention snapshots. You can make it run right away with the command    

 

 

znapzend --runonce=HDD  

 

See more @ https://github.com/oetiker/znapzend/blob/master/README.md

 

"If you don't want to wait for the scheduler to actually schedule work, you can also force immediate action by calling

 

znapzend --noaction --debug --runonce=src_dataset

 

"

 

 

Sent from my iPhone using Tapatalk

Link to comment
  • 7 months later...

Hi @all

i am new on unraid and want to setup ZFS autosnaps with znapzend

 

on my v6.8.3 i get after installed package always the issue:

 /usr/bin/perl: error while loading shared libraries: libnsl.so.2: cannot open shared object file: No such file or directory

 

what can i do to fix this ?

 

 

thanks alot

br faxour

Link to comment

@steini84 Had a quick look by running it manually.  I'm getting an out of space error, but actually there's a ton of space on the device, 47G actually - see below.

 

I'll try a few things to see if I can start it.  Also, the log has no details since the last successful backup, which was 21 December.

 

znapzend --logto=/var/log/znapzend.log --daemonize

Warning: unable to close filehandle GEN0 properly: No space left on device at /opt/znapzend-0.20.0/lib/ZnapZend.pm line 827.

znapzend (5197) is running in the background now.

Edited by Marshalleq
Link to comment

I may have found the problem, it appears the upgrade to RC2 or RC1 renamed the disks and left the USB boot drive with the name of a pre-existing raid array disk i.e. the usb disk drive is now named disk1.  Unfortunately unraid decided to put a backup share therefore, onto the usb drive and periodically an application would try to send data there filling up the USB drive.  Why it was empty when I looked I don't know, so there's some doubt in my mind, but this looks like the likely culprit.

Edit - Nope this is incorrect, I was confusing between two USB devices, one that is now a dummy array and another that is the boot device.  Geez, sometimes you just need more coffee.  But, for the first time now for some reason znapzend started working again so don't know why that is yet.

Edited by Marshalleq
Link to comment
  • 2 weeks later...

So just checked in on it today and it's stopped again.  Comparing the last snapshot to the last reboot I can see that they are indeed correlated.  So this is frustrating.  @steini84 I have attached diagnostics which should include any startup errors and when it did eventually start manually (just now).  Will have a look through them again too and post back.  Perhaps the auto start 'touch' method outlined at the beginning of this post no longer works?

 

Of note, this is happening on both my unraid systems.

skywalker-diagnostics-20210106-1501.zip

Edited by Marshalleq
Link to comment
  • 3 weeks later...

Yeah this should do the trick: 

znapzend --debug --logto=/var/log/znapzend.log --daemonize

 

I also want to let you know that I was using znapsend and ran in to some problems, for example after changing datasets. I moved over to Sanoid/Syncoid and have not had a single problem since. 

 

Not saying that one solution is better than the other, but that was my experience and I would reccomend that you check it out :)

Link to comment
  • 11 months later...

I'm posting a problem and solution, I found this exact error in a few other places but not here:

 

/usr/bin/perl: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib64/perl5/CORE/libperl.so)

 

is what I get when I try running any znapzend command, to fix this I had to install the nerd pack then enable perl. Maybe obvious to others but it took me a bit to figure out.

  • Like 2
Link to comment
  • 3 months later...
12 minutes ago, steini84 said:


Just to put it out there. I have personally moved to sanoid/syncoid


Sent from my iPhone using Tapatalk

Good to know. 😆

 

For now, I'm having to much trouble with Sanoid, so I'm getting my hands with Znapzend to understand where I might have been wrong with Sanoid which seems indeed a bit more powerfull.

Link to comment
  • 2 months later...

Seems not working on latest unraidOS 6.10.3 :(

 

znapzend --debug --logto=/var/log/znapzend.log --daemonize
/usr/bin/perl: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/bin/perl)
/usr/bin/perl: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib64/perl5/CORE/libperl.so)

 

Edited by segator
Link to comment
37 minutes ago, segator said:

Seems not working on latest unraidOS 6.10.3 :(

 

znapzend --debug --logto=/var/log/znapzend.log --daemonize
/usr/bin/perl: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/bin/perl)
/usr/bin/perl: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib64/perl5/CORE/libperl.so)

 

Fix is install perl and reboot!!, installing perl only was not enough for me

Link to comment
  • 2 months later...

To get znapzend to work on 6.10.3 this is the steps I had to take. I have confirmed this methods on 5 different Unraid installs of version 6.10.3

Have "Dev Pack", "Nerd Pack", "ZFS", "ZFS-companion", "ZFS Master", and "ZnapZend" installed through the apps.

Next go to "Dev Pack" and install the following:

gc-8.0.4-x86_64-1.txz
gcc-9.2.0-x86_64-4.txz
gcc-gplus-9.2.0-x86_64-4.txz
glibc-2.30-x86_64-1.txz
guile-2.2.3-x86_64-2.txz
make-4.2.1-x86_64-3.txz


Next go to "Nerd Pack" and install the following:

perl-5.32.0-x86_64-1.txz

^ Note to everyone, it will say perl did not installed. Don't worry the script we run next fixes the issue and installs perl, having it set to be turned on in Nerd Pack is just an easy way to confirm it is downloaded and installed once finished.

Now we are going to open up terminal and run the following commands:

wget https://github.com/zfsonlinux/zfs-auto-snapshot/archive/upstream/1.2.4.tar.gz
tar -xzf 1.2.4.tar.gz
cd zfs-auto-snapshot-upstream-1.2.4
make install


Reboot and once rebooted open terminal and check to see if install is working

znapzendzetup list

will do the trick.

To create a auto snapshout a basic command that I use is

znapzendzetup create --recursive SRC '7d=>1h,30d=>4h,90d=>1d' storage-array-1/Music

just replace "storage-array-1/Music" with your dataset.

Reboot once last time now that all your snapshots are setup, and your done!

P.S for those who liked having the "Dynamix System Temp" this also fixes it's issue as now perl is installed and working.

Screenshot 2022-09-17 054032.png

Screenshot 2022-09-17 054206.png

Screenshot 2022-09-17 054228.png

Edited by JJJonesJr33
Forgot a command at the end
Link to comment
  • 6 months later...
4 hours ago, Jclendineng said:

Does this work for anyone on 6.12? I got it to run once after setup but it doesn’t run automatically, I set the service to start at boot and have a from for every hour. 

Thanks for pointing this out, no mine isn't working either, timestamps stopped at time of upgrade.  So you're saying if I go an start it, it will then just snap everything every hour?  That's weird.

Link to comment
28 minutes ago, Marshalleq said:

Thanks for pointing this out, no mine isn't working either, timestamps stopped at time of upgrade.  So you're saying if I go an start it, it will then just snap everything every hour?  That's weird.

 

18 minutes ago, Jclendineng said:

No it will run once but then not run again

 

You will need to run 
```
znapzend --daemonize
```
```
touch /boot/config/plugins/unRAID6-ZnapZend/auto_boot_on
```

 

Then reboot. That should fix it. To test run the

```
znapzend --daemonize
```

command again after reboot and it should tell you it’s already running. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.