• Time machine backups

    From Lars Poulsen@21:1/5 to vallor on Wed Jan 8 02:49:11 2025
    On 2025-01-07, vallor <vallor@cultnix.org> wrote:
    Bought a 4TB external USB/NVME device for my workstation.
    Installed Samba and configured it to use the "fruit"
    module to offer up a Time Machine share for the
    Mac Studio. (Also using it with Timeshift on the
    workstation itself, but that part was easier.)

    (Backups are good; automated versioned backups are better.)

    I have setup "time machine" backups on two of my servers, using rsync to
    a local external drive, but I have not figured out how to do it to a
    Samba share. On the local external drive, using ext4 file system, hard
    links make it very space efficient, but I don't think you can do that
    with a Samba mounted remote drive. Any hints? Do you run the rsync on
    the file server, so that you can do the hard links on the backup drive's
    ext4 file system while the backup server sees its production client as
    the remote Samba mount?

    And is there a way to use a cheap remote "storage box" that is only
    accessible as a Samba NAS as the versioned storage medium with
    similarly good storage efficiency?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to lars@cleo.beagle-ears.com on Wed Jan 8 04:22:41 2025
    On Wed, 8 Jan 2025 02:49:11 -0000 (UTC), Lars Poulsen <lars@cleo.beagle-ears.com> wrote in <slrnvnrpt7.2oheu.lars@cleo.beagle-ears.com>:

    On 2025-01-07, vallor <vallor@cultnix.org> wrote:
    Bought a 4TB external USB/NVME device for my workstation. Installed
    Samba and configured it to use the "fruit" module to offer up a Time
    Machine share for the Mac Studio. (Also using it with Timeshift on the
    workstation itself, but that part was easier.)

    (Backups are good; automated versioned backups are better.)

    I have setup "time machine" backups on two of my servers, using rsync to
    a local external drive, but I have not figured out how to do it to a
    Samba share. On the local external drive, using ext4 file system, hard
    links make it very space efficient, but I don't think you can do that
    with a Samba mounted remote drive. Any hints? Do you run the rsync on
    the file server, so that you can do the hard links on the backup drive's
    ext4 file system while the backup server sees its production client as
    the remote Samba mount?

    And is there a way to use a cheap remote "storage box" that is only accessible as a Samba NAS as the versioned storage medium with similarly
    good storage efficiency?

    I'm not doing anything on the backend except provide the
    Samba share. MacOS Time Machine has it's own format
    for storing versioned data, which is fairly opaque when
    looking at the files on the backend filesystem.

    Here's the web page with the recipe I followed:

    https://blog.jhnr.ch/2023/01/09/setup-apple-time-machine-network-drive-with-samba-on-ubuntu-22.04/

    I _assume_ it's space efficient, with either incremental or
    differential backups -- but I'm watching it carefully to make
    sure that turns out to be the case.

    Our Mac Studio is named "Mac Studio". On the server side, I see
    in the share's directory a subdirectory, "Mac Studio.sparsebundle",
    which contains various files and directories, including one
    named "bands". That directory contains multiple files of length
    536870912 bytes, which would seem to be the backup(s) themselves,
    in a structure managed by MacOS.

    I'm also using Timeshift (not Time Machine) on my Linux
    workstation, which backs up directly to the ext4 filesystem
    on the external drive with rsync. I'm pretty sure that uses
    hard links to be space-efficient. (It would be even better
    and faster if it hard-linked directories, but that's not a
    BCP for Unix.)

    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.12.8 Release: Mint 21.3 Mem: 258G
    "If at first you don't succeed, then Sky Diving is not for you!"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From D@21:1/5 to Lars Poulsen on Wed Jan 8 11:21:55 2025
    On Wed, 8 Jan 2025, Lars Poulsen wrote:

    On 2025-01-07, vallor <vallor@cultnix.org> wrote:
    Bought a 4TB external USB/NVME device for my workstation.
    Installed Samba and configured it to use the "fruit"
    module to offer up a Time Machine share for the
    Mac Studio. (Also using it with Timeshift on the
    workstation itself, but that part was easier.)

    (Backups are good; automated versioned backups are better.)

    I have setup "time machine" backups on two of my servers, using rsync to
    a local external drive, but I have not figured out how to do it to a
    Samba share. On the local external drive, using ext4 file system, hard
    links make it very space efficient, but I don't think you can do that
    with a Samba mounted remote drive. Any hints? Do you run the rsync on
    the file server, so that you can do the hard links on the backup drive's
    ext4 file system while the backup server sees its production client as
    the remote Samba mount?

    And is there a way to use a cheap remote "storage box" that is only accessible as a Samba NAS as the versioned storage medium with
    similarly good storage efficiency?


    My current backup system is rsync over ssh and tor. I've used it
    successfully between two countries about 800 km apart. Come to think of
    it, even longer.

    I also use hardlinks to save space, and I run a 60 day sliding window on
    the server to keep the last 60 days of backups. It works great.

    During the christmas holidays I've checked out restic. I am very happy
    about the result and I'm thinking about retiring my own home cooked backup script I've used for 10-15 years in favour of restic.

    What I like about it is that:

    1. It's a simple go executable, I just drop in on the linux system and off
    you go. All batteries included.

    2. Works over sftp, so I don't need anything on the server.

    3. Has built in deduplication and like rsync, transmits only unique data.
    I do a full backup when visiting my backup server, and then do
    differentials when travelling and works beautifully.

    If you are curious, here's the link: https://restic.readthedocs.io/ .

    Oh, and in terms of NAS and smb, I use an old laptop as the backup server,
    and I mount my NAS (2 x 4 TB disks) in fstab at boot. When I backup, I
    I have my backup repository under /mnt/NAS/backup, so the data travels
    over sftp to the backup server, and then rests peacefully on my smb mount.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Natural Philosopher@21:1/5 to Lars Poulsen on Wed Jan 8 11:58:04 2025
    On 08/01/2025 02:49, Lars Poulsen wrote:
    On 2025-01-07, vallor <vallor@cultnix.org> wrote:
    Bought a 4TB external USB/NVME device for my workstation.
    Installed Samba and configured it to use the "fruit"
    module to offer up a Time Machine share for the
    Mac Studio. (Also using it with Timeshift on the
    workstation itself, but that part was easier.)

    (Backups are good; automated versioned backups are better.)

    I have setup "time machine" backups on two of my servers, using rsync to
    a local external drive, but I have not figured out how to do it to a
    Samba share. On the local external drive, using ext4 file system, hard
    links make it very space efficient, but I don't think you can do that
    with a Samba mounted remote drive. Any hints? Do you run the rsync on
    the file server, so that you can do the hard links on the backup drive's
    ext4 file system while the backup server sees its production client as
    the remote Samba mount?

    And is there a way to use a cheap remote "storage box" that is only accessible as a Samba NAS as the versioned storage medium with
    similarly good storage efficiency?

    Anyioe expecting to preserve an ext4 file system accurately on a samba
    mounted share needs their head examined.
    Use NFS.

    --
    "Women actually are capable of being far more than the feminists will
    let them."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Lars Poulsen on Wed Jan 8 13:47:25 2025
    On 2025-01-08 03:49, Lars Poulsen wrote:
    On 2025-01-07, vallor <vallor@cultnix.org> wrote:
    Bought a 4TB external USB/NVME device for my workstation.
    Installed Samba and configured it to use the "fruit"
    module to offer up a Time Machine share for the
    Mac Studio. (Also using it with Timeshift on the
    workstation itself, but that part was easier.)

    (Backups are good; automated versioned backups are better.)

    I have setup "time machine" backups on two of my servers, using rsync to
    a local external drive, but I have not figured out how to do it to a
    Samba share. On the local external drive, using ext4 file system, hard
    links make it very space efficient, but I don't think you can do that
    with a Samba mounted remote drive. Any hints? Do you run the rsync on
    the file server, so that you can do the hard links on the backup drive's
    ext4 file system while the backup server sees its production client as
    the remote Samba mount?

    And is there a way to use a cheap remote "storage box" that is only accessible as a Samba NAS as the versioned storage medium with
    similarly good storage efficiency?


    You can not backup using any type of file copy, like rsync, a Linux
    filesystem into samba, or a windows filesystem.

    The only way to do it is using archives like tar.

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Natural Philosopher@21:1/5 to Carlos E.R. on Wed Jan 8 13:19:49 2025
    On 08/01/2025 12:47, Carlos E.R. wrote:
    On 2025-01-08 03:49, Lars Poulsen wrote:
    On 2025-01-07, vallor <vallor@cultnix.org> wrote:
    Bought a 4TB external USB/NVME device for my workstation.
    Installed Samba and configured it to use the "fruit"
    module to offer up a Time Machine share for the
    Mac Studio. (Also using it with Timeshift on the
    workstation itself, but that part was easier.)

    (Backups are good; automated versioned backups are better.)

    I have setup "time machine" backups on two of my servers, using rsync to
    a local external drive, but I have not figured out how to do it to a
    Samba share. On the local external drive, using ext4 file system, hard
    links make it very space efficient, but I don't think you can do that
    with a Samba mounted remote drive. Any hints? Do you run the rsync on
    the file server, so that you can do the hard links on the backup drive's
    ext4 file system while the backup server sees its production client as
    the remote Samba mount?

    And is there a way to use a cheap remote "storage box" that is only
    accessible as a Samba NAS as the versioned storage medium with
    similarly good storage efficiency?


    You can not backup using any type of file copy, like rsync, a Linux filesystem into samba, or a windows filesystem.

    The only way to do it is using archives like tar.

    If I understand what you meant by that, I would agree.
    SAMBA is not a suitable way to back anything up at all. Except at a
    trivial level of data files

    You need to use a linux file system and rsync either with rsyncd or
    direct copy to an NFS system


    --
    The urge to save humanity is almost always a false front for the urge to
    rule.
    – H. L. Mencken, American journalist, 1880-1956

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lars Poulsen@21:1/5 to The Natural Philosopher on Wed Jan 8 14:37:31 2025
    On 2025-01-08, The Natural Philosopher <tnp@invalid.invalid> wrote:
    Anyioe expecting to preserve an ext4 file system accurately on a samba mounted share needs their head examined.
    Use NFS.

    I am not expecting to accurately have an exact ext4 system on a share.
    Just keeps the data, but deduplicated. AFAIK, Hetzner does not allow NFS
    access to their very cost-effective storage boxes. And while it is very
    simple to run a Fedora instance on the datacenter, the virtual machines
    there have limited storage, and you provision storage by samba-mounting
    a storage box.

    It is a great system, but has its limitations.

    I wish I could figure out how to provision the same features in AWS, but
    I find the learning curve to steep for my old brain.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lars Poulsen@21:1/5 to vallor on Wed Jan 8 14:25:14 2025
    On 2025-01-07, vallor <vallor@cultnix.org> wrote:
    Bought a 4TB external USB/NVME device for my workstation. Installed
    Samba and configured it to use the "fruit" module to offer up a Time
    Machine share for the Mac Studio. (Also using it with Timeshift on the
    workstation itself, but that part was easier.)
    (Backups are good; automated versioned backups are better.)

    On Wed, 8 Jan 2025 02:49:11 -0000 (UTC), Lars Poulsen wrote in
    <slrnvnrpt7.2oheu.lars@cleo.beagle-ears.com>:
    I have setup "time machine" backups on two of my servers, using rsync to
    a local external drive, but I have not figured out how to do it to a
    Samba share. On the local external drive, using ext4 file system, hard
    links make it very space efficient, but I don't think you can do that
    with a Samba mounted remote drive. Any hints? Do you run the rsync on
    the file server, so that you can do the hard links on the backup drive's
    ext4 file system while the backup server sees its production client as
    the remote Samba mount?

    And is there a way to use a cheap remote "storage box" that is only
    accessible as a Samba NAS as the versioned storage medium with similarly
    good storage efficiency?

    On 2025-01-08, vallor <vallor@cultnix.org> wrote:
    I'm not doing anything on the backend except provide the
    Samba share. MacOS Time Machine has it's own format
    for storing versioned data, which is fairly opaque when
    looking at the files on the backend filesystem.

    Yes, I know Time Machine.

    I'm also using Timeshift (not Time Machine) on my Linux
    workstation, which backs up directly to the ext4 filesystem
    on the external drive with rsync. I'm pretty sure that uses
    hard links to be space-efficient. (It would be even better
    and faster if it hard-linked directories, but that's not a
    BCP for Unix.)

    Yes, that seems to be exactly what I did with a cronjob running rsync.
    I like it, and would like to put the backup drive off-site once I get a
    faster network connection (gigabit fiber) activated in a week or two.
    But I don't know enough about how to set it up.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Lars Poulsen on Wed Jan 8 18:25:29 2025
    Lars Poulsen <lars@cleo.beagle-ears.com> wrote:
    On 2025-01-08, The Natural Philosopher <tnp@invalid.invalid> wrote:
    Anyioe expecting to preserve an ext4 file system accurately on a samba
    mounted share needs their head examined.
    Use NFS.

    I am not expecting to accurately have an exact ext4 system on a share.
    Just keeps the data, but deduplicated. AFAIK,

    Don't try to directly 'rsync' any Linux filesystem to a samba share as
    a backup. Samba will not store everything needed to recover (you'll
    have your data, except for those files with names that are 'invalid' in
    the windows samba world) but none of the ownerships/permissions will be correct.

    If you must use samba as the backing store, then use something like
    Restic which stores the data in its own internal format and only
    requires "basic file storage and basic filenames" support from the
    underlying backing store.

    Restic: https://restic.net/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to Rich on Wed Jan 8 18:28:31 2025
    On Wed, 08 Jan 2025 18:25:29 +0000, Rich wrote:

    Lars Poulsen <lars@cleo.beagle-ears.com> wrote:
    On 2025-01-08, The Natural Philosopher <tnp@invalid.invalid> wrote:
    Anyioe expecting to preserve an ext4 file system accurately on a samba
    mounted share needs their head examined.
    Use NFS.

    I am not expecting to accurately have an exact ext4 system on a share.
    Just keeps the data, but deduplicated. AFAIK,

    Don't try to directly 'rsync' any Linux filesystem to a samba share as
    a backup. Samba will not store everything needed to recover (you'll
    have your data, except for those files with names that are 'invalid' in
    the windows samba world) but none of the ownerships/permissions will be correct.

    If you must use samba as the backing store, then use something like
    Restic which stores the data in its own internal format and only
    requires "basic file storage and basic filenames" support from the
    underlying backing store.

    Restic: https://restic.net/

    Or tar(1), with or without compression.

    --
    Lew Pitcher
    "In Skills We Trust"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lars Poulsen@21:1/5 to Rich on Wed Jan 8 19:24:03 2025
    On Wed, 08 Jan 2025 18:25:29 +0000, Rich wrote:
    If you must use samba as the backing store, then use something like
    Restic which stores the data in its own internal format and only
    requires "basic file storage and basic filenames" support from the
    underlying backing store.

    Restic: https://restic.net/

    On 2025-01-08, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
    Or tar(1), with or without compression.

    I think restic has promise.

    tar(1) does NOT allow me to have a complete backup for every snapshot
    without wasting space on multiple copies of the majority of files tht
    did not change.

    I suppose one could use one large file on the samba server, mount it
    through some tunnel that lets you see it as a block device; create an
    ext4 file system on that block device, then use rsync to that file system
    to create a backup with versioning. Could this be done with a loopback
    mount?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to lars@cleo.beagle-ears.com on Wed Jan 8 20:27:12 2025
    On Wed, 8 Jan 2025 19:24:03 -0000 (UTC), Lars Poulsen <lars@cleo.beagle-ears.com> wrote in <slrnvntk6j.31j9q.lars@cleo.beagle-ears.com>:

    On Wed, 08 Jan 2025 18:25:29 +0000, Rich wrote:
    If you must use samba as the backing store, then use something like
    Restic which stores the data in its own internal format and only
    requires "basic file storage and basic filenames" support from the
    underlying backing store.

    Restic: https://restic.net/

    On 2025-01-08, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
    Or tar(1), with or without compression.

    I think restic has promise.

    tar(1) does NOT allow me to have a complete backup for every snapshot
    without wasting space on multiple copies of the majority of files tht
    did not change.

    I suppose one could use one large file on the samba server, mount it
    through some tunnel that lets you see it as a block device; create an
    ext4 file system on that block device, then use rsync to that file system
    to create a backup with versioning. Could this be done with a loopback
    mount?

    I was going to suggest that, but also using LUKS to encrypt
    the volume -- at least if you're storing it on some cloud provider.
    "It should work." (More famous last words. ;) )

    (One downside is LUKS apparently won't allow a sparse file
    being used for your loopback mount to remain sparse, since
    it encrypts across the whole block device.)

    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.12.8 Release: Mint 21.3 Mem: 258G
    "A pessimist is never disappointed."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From D@21:1/5 to Carlos E.R. on Thu Jan 9 17:51:18 2025
    On Wed, 8 Jan 2025, Carlos E.R. wrote:

    On 2025-01-08 03:49, Lars Poulsen wrote:
    On 2025-01-07, vallor <vallor@cultnix.org> wrote:
    Bought a 4TB external USB/NVME device for my workstation.
    Installed Samba and configured it to use the "fruit"
    module to offer up a Time Machine share for the
    Mac Studio. (Also using it with Timeshift on the
    workstation itself, but that part was easier.)

    (Backups are good; automated versioned backups are better.)

    I have setup "time machine" backups on two of my servers, using rsync to
    a local external drive, but I have not figured out how to do it to a
    Samba share. On the local external drive, using ext4 file system, hard
    links make it very space efficient, but I don't think you can do that
    with a Samba mounted remote drive. Any hints? Do you run the rsync on
    the file server, so that you can do the hard links on the backup drive's
    ext4 file system while the backup server sees its production client as
    the remote Samba mount?

    And is there a way to use a cheap remote "storage box" that is only
    accessible as a Samba NAS as the versioned storage medium with
    similarly good storage efficiency?


    You can not backup using any type of file copy, like rsync, a Linux filesystem into samba, or a windows filesystem.

    The only way to do it is using archives like tar.

    Apart from samba, I have used the rsync + hardlinks method for backup with
    much success between countries, for decades.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From D@21:1/5 to Rich on Thu Jan 9 18:05:46 2025
    On Wed, 8 Jan 2025, Rich wrote:

    Lars Poulsen <lars@cleo.beagle-ears.com> wrote:
    On 2025-01-08, The Natural Philosopher <tnp@invalid.invalid> wrote:
    Anyioe expecting to preserve an ext4 file system accurately on a samba
    mounted share needs their head examined.
    Use NFS.

    I am not expecting to accurately have an exact ext4 system on a share.
    Just keeps the data, but deduplicated. AFAIK,

    Don't try to directly 'rsync' any Linux filesystem to a samba share as
    a backup. Samba will not store everything needed to recover (you'll
    have your data, except for those files with names that are 'invalid' in
    the windows samba world) but none of the ownerships/permissions will be correct.

    If you must use samba as the backing store, then use something like
    Restic which stores the data in its own internal format and only
    requires "basic file storage and basic filenames" support from the
    underlying backing store.

    Restic: https://restic.net/


    Excellent. Thank you for confirming. Restic also has this "check" function
    to detect inconsistencies, bitrot and other stuff. Sadly NFS did not work
    with my ancient NAS, so smb was what I had to work with, to mount it to my backup server. Would have preferred NFS though. =(

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Natural Philosopher@21:1/5 to All on Thu Jan 9 18:37:38 2025
    On 09/01/2025 16:51, D wrote:
    Apart from samba, I have used the rsync + hardlinks method for backup
    with much success between countries, for decades.
    Yes. Its fine if the directory structure you are using to archive is in
    fact compatible with the source directory trees permissions and ownerships.

    Samba is not.

    --
    The biggest threat to humanity comes from socialism, which has utterly
    diverted our attention away from what really matters to our existential survival, to indulging in navel gazing and faux moral investigations
    into what the world ought to be, whilst we fail utterly to deal with
    what it actually is.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From D@21:1/5 to The Natural Philosopher on Sat Jan 11 13:02:51 2025
    On Thu, 9 Jan 2025, The Natural Philosopher wrote:

    On 09/01/2025 16:51, D wrote:
    Apart from samba, I have used the rsync + hardlinks method for backup with >> much success between countries, for decades.
    Yes. Its fine if the directory structure you are using to archive is in fact compatible with the source directory trees permissions and ownerships.

    Samba is not.

    It also depends on if you need to save the permissions and ownerships or
    not. Sometimes, like in my case, it is enough to save the data. I can
    always fix permissions and owners later if I need it.

    I have been pleasantly surprised by restic so far. It seems to be well
    written and to function as expected so far, and performance is quite good
    as well.

    It look as if I will switch from my classic rsync + hardlinks method to
    restic. But we'll know for sure in a few months.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Natural Philosopher@21:1/5 to All on Sat Jan 11 12:30:40 2025
    On 11/01/2025 12:02, D wrote:


    On Thu, 9 Jan 2025, The Natural Philosopher wrote:

    On 09/01/2025 16:51, D wrote:
    Apart from samba, I have used the rsync + hardlinks method for backup
    with much success between countries, for decades.
    Yes. Its fine if the directory structure you are using to archive is
    in fact compatible with the source directory trees permissions and
    ownerships.

    Samba is not.

    It also depends on if you need to save the permissions and ownerships or
    not. Sometimes, like in my case, it is enough to save the data. I can
    always fix permissions and owners later if I need it.

    +1. No argument there. A text file that can be read is all you need
    sometimes

    I have been pleasantly surprised by restic so far. It seems to be well written and to function as expected so far, and performance is quite
    good as well.

    It look as if I will switch from my classic rsync + hardlinks method to restic. But we'll know for sure in a few months.

    --
    “Some people like to travel by train because it combines the slowness of
    a car with the cramped public exposure of 
an airplane.”

    Dennis Miller

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)