Time machine backup on SMB share

  • could that write up be used in the same way but for OMV? Or is there something within that process that would fail.

    Unfortunately the whole write up is a fail since it only tries to cope with creating backups (using the pretty unreliable tmutil setdestination method). This tutorial totally ignores two things:


    • why we do backup: to be able to (do a full) restore. This won't work with such a hack since the share is not announced automagically in the network. So once your Mac's drive died you won't be able to restore from your backup unless you're an expert. Everything that requires special knowledge or manual work around backup is bad
    • it also ignores reliability. An SMB server doing TM backups must at least support the F_FULLFSYNC Extension to reliably store backups. Otherwise data corruption will happen anyway. So trying this prior to Samba 4.8 is a horribly bad idea


    The web is full of dangerous TM tutorials and confusion (like the one spread here, not understanding that TM over AFP still works flawlessly). It started back with OS X 10.5 when people proposed ugly hacks to make TM work over SMB, NAS vendors like Synology advertised TM capabilities without using an appropriate Netatalk version supporting the recently introduced new AFP calls and so on. Then people loose data, forget about these complicated hacks but of course the tutorials remain...

  • Works as expected, restore and disaster recovery included.

    That is interesting. Mine looks just the same.
    OMV

    Mac

    I did not modified the default settings, neither for AFP in general nor for the share itself. The only change in the share is that I enabled the time machine support. The share resides on an LUKS-encrypted RAID-5 of the OMV but that should not make any difference, shouldn't it?
    I also tried to connect the share with user credentials from OMV as well as a guest (with guest read and write access enabled). Make no difference. Any more hints what I could try?

  • Perhaps there are clues in my experience this week:


    My TM has not been working on two servers. I just stopped using it. With @tkaiser asserting that it works; I decided to reinstall the plugin. It did not work. I then thought about wether this may be a file system issue. I have UnionFS which is actually mergerfs holding together my data that resides on multiple EXT4 formatted drives. I then started to recall all the adjustments I had to do if I wanted to have my PlexDB on my fused volume. So I made the same adjustments to the /ect/fstab that I need to to use that volume to hold my Plex transcode directory and PlexDB. TimeMachine now sort of works — I have to investigate if I am really having issues with multiple clients using the same volume to TM their Macs.



    defaults,allow_other,use_ino,dropcacheonclose=true,func.getattr=newest



    https://github.com/trapexit/mergerfs

    Version7.0-32 (Sandworm)
    ProcessorAMD EPYC 7302P 16-Core Processor
    KernelLinux 6.1.15-1-pve
    HardwareDell R7515
  • TimeMachine now sort of works


    Apple invented an own AFP call for TimeMachine back at 10.5 times and did the same with SMB defining a new SMB Extensions for the simple reason to sync data to disk without having layers in between that do not do this (keep data cached). I would never use any FUSE based filesystem for my TM shares. Never!


    My choices are either ZFS or btrfs since those CoW filesystems allow for snapshot creation so you can always revert back to older snapshots if your sparse bundle gets corrupted. With btrfs a recent kernel and also a recent Debian version is important (since older Debian releases ship with a horribly outdated btrfs-tools package that will cause more harm than do any good if you need to query/repair btrfs filesystems)

  • TL;DR: does 'fruit:time machine max size = 200G' work with OMV5/Samba 4.9.5?


    Full story:


    I am trying to revive old DNS-325 NAS box (armel single core 1.2GHz CPU, 256MB RAM) replacing original D-Link firmware with OMV. Version 4 is just fine, but Time Machine backups over AFP are slow. Version 5 of OMV is no-go for this hardware since it uses always running configuration agent which takes near 30MB RAM and it is so slow that any change takes minutes to be applied.


    In order to use TimeMachine backups I rebuilt Samba 4.9.5 packages from buster on stretch (including all dependencies of course, 84 packages total were built to build samba, but only 10 or so are required for upgrade on top of official stretch versions). After adding a repo I did 'apt install samba' and the system was upgraded without any issues. So now I have OMV4 with Samba 4.9.5 with TM support.


    Next I tried to patch OMV4 to add TM support and TM quota options to UI, but later I decided to stay on the original OMV4 and use Extra configs for SMB service and SMB shares (also optionally disabling Avahi for SMB using internal Samba mDNS option). Everything is fine except TM quotas.


    When I have no Time Machine quotas set, it works great, much better for me than AFP version. But when I add the line 'fruit:time machine max size = 200G' in the share configuration, this share becomes inaccessible via SMB neither for TM nor for plain files - Mac just can't open the folder. This is the only option which breaks the access. I tried it in combinations from OMV5 fruit configs to many others, no luck.


    The questions are:
    - why OMV5 does not support this option (at least, when I looked at it, it did not) - is there a reason for?
    - anybody tried it at all?
    - any hints how to limit TM disk space not using a whole filesystem user quotas?


    Ideally I wish to limit the quota per user, but even quota per share would be good enough (I can have one TM share per user).


    I also tried to put misc com.apple.TimeMachine.quota.plist (with leading dot and without it) to different places, and it doesn't seem to work at all (ignored by TM clients).


    Any help is highly appreciated.

  • It seems that I found the problem - it is a bug in samba source code if built for armel architecture (it may work on x86/64).


    In vfs_fruit some data types are used: off_t and size_t. The first is normally used for file sizes and is 8 bytes long (as configured for samba build), the second is used to count objects and is 4 bytes long (according to my build logs). But in the vfs_fruit code they for some reason compare free space with SIZE_MAX constant which is for size_t and is 4GB max. So the overflow is detected and error returned.


    There are two options to fix that: either set size_t to 8 bytes globally (I do not know where else they may mix file size type with object count type), or fix this only issue locally for vfs_fruit. I will try to do the second for now and see if it solves the problem.

  • After investigation I realised that this bug is already known and reported. The reporter's solution is not complete, so I added a comment to it. I rebuilt vfs_fruit and confirmed that it works properly. Now I am rebuilding the whole samba-4.9.5 package for clean upgrades.


    The bug report is here: https://bugzilla.samba.org/show_bug.cgi?id=13622
    It seems no one is fixing it since 2018. Maybe you may push Ralph to put fixes upstream.


    Apart from samba package upgrade via apt it seems no more changes is required to use it (including TimeMachine over SMB) with OMV4 which, as I said, is the only version running well on low powered NAS boxes.

    • Offizieller Beitrag

    It seems no one is fixing it since 2018.

    Probably because most arm cpus now are armhf/arm64. Not many people use armel anymore especially with samba.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • It doesn't matter assuming that fix is:
    - known
    - trivial
    - fixes bug in the officially offered samba package for armel


    I agree that size_t should "store the maximum size of a theoretically possible object of any type (including array)". But at the same time the code mixes off_t and size_t both used for representing file sizes (say, band sizes) when other modules use uint64_t. So if I was a maintainer, I would fix it asap. But I am not a maintainer, so I've fixed it for myself.

  • Hi,


    I try to do a time machine backup on an OMV SMB share. I have OMV version 4.1.12 with all updates installed. SMB is running and I can connect to the backup share from the MAC. The smbd claims to be able to support Apples SMB extensions

    for you my settings


    Externer Inhalt youtu.be
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!