Samba For Time Machine

  • Ok but how can I limit the size of the backup? Time machine makes an incremental backup and as long as there is space the backup grows

    [Edit]
    Found the solution here: https://www.reddit.com/r/homel…chine_backups_on_a_samba/


    To set quotas you need to put a .com.apple.TimeMachine.quota.plist file:


    Code
    cat <<< _EOF_ > /srv/backup/timemachine/$USERNAME/.com.apple.TimeMachine.quota.plist
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>GlobalQuota</key>
    <integer>300000000000</integer>
    </dict>
    </plist>
    _EOF_

    Size is in Byte, so 300GB in this example


  • so I added the file in the backup folder :

    Code
    root@openmediavault:/srv/dev-disk-by-label-data03/mac_backup# ls -la
    total 20
    drwxrwsr-x+ 1 root users 216 Jan  6 09:12  .
    drwxr-xr-x  1 root root   40 Jan  5 15:37  ..
    -rw-rw-r--+ 1 root users 252 Jan  6 09:12  .com.apple.TimeMachine.quota.plist
    drwx------+ 1 tm   users 376 Jan  6 08:55 'MacBook Air de Alan.purgeable.sparsebundle'
    Code
    root@openmediavault:/srv/dev-disk-by-label-data03/mac_backup# cat .com.apple.TimeMachine.quota.plist 
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
      <key>GlobalQuota</key>
        <integer>300000000000</integer>
      </dict>
    </plist>


    restarted the Daemon


    Code
    root@openmediavault:/srv/dev-disk-by-label-data03/mac_backup# systemctl restart smbd.service


    but it still wants to use the whole 2 TB. Any Idea?

  • I have a followup question related to this. I have a 5 TB 2.5" USB drive (raspi 4, OMV5), of which I want to use 1.5-2 TB for time machine backups. I believe the recommendation from OMV is not to partition the drive (so just use a 'TimeMachine' folder at the root of the drive). So currently I intend to do this.


    I too want to restrict time machine backups (to 1.5-2 TB). However there are several users with different disk sizes to backup: user1, user 2 (500 GB), user3, user4 (128 GB). To accommodate them I need top create a share pro user and add a quota file:


    cat <<< _EOF_ > /srv/backup/timemachine/user1/.com.apple.TimeMachine.quota.plist ...etc
    cat <<< _EOF_ > /srv/backup/timemachine/user2/.com.apple.TimeMachine.quota.plist ...etc
    etc


    Then (or at the start) I need to create 4 users (OMV: Access Rights Management, User) and ensure they all belong to the sambashare group. And of course I have to create a shared folder before I can share it via SMB/CIFS.


    Is this right, anything I've not thought of?

    Einmal editiert, zuletzt von anotherchris () aus folgendem Grund: formatting, correction

Jetzt mitmachen!

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