Follow By Email

Tuesday, January 31, 2023

[New post] Backing up to network storage: checks and balances

Site logo image hoakley posted: "This summer it will be ten years since Apple discontinued its last Time Capsule, the end of the line of products for which it introduced Time Machine. Although most of us using Time Machine now back up to local storage, Apple continues to support it makin" The Eclectic Light Company

Backing up to network storage: checks and balances

hoakley

Feb 1

This summer it will be ten years since Apple discontinued its last Time Capsule, the end of the line of products for which it introduced Time Machine. Although most of us using Time Machine now back up to local storage, Apple continues to support it making backups over a network, either to another Mac or to network storage such as a NAS. This article looks at some checks and balances you'll find Time Machine making when it backs up over a network, in Ventura 13.2. In this case I'm using an excellent Asustor AS6702T.

There are two major differences in backing up over a network: rather than Time Machine writing its backups through a local file system, now APFS (although legacy backups to HFS+ are still supported), a network file system is used instead. With AFP long deprecated, unless you still have to support older macOS, SMB is much preferred, and used here. This article won't explore those intricacies, though, but concentrate on the other difference, that backups are stored in a sparse bundle. This provides a virtual file system with structured directories containing thousands of band files, suitable for storage on a wide range of different native file systems.

Creating the sparse bundle

Making the first backup to network storage has other requirements before it can create the sparse bundle. Among them is storing the password for access to the storage together with its URL in the system keychain, to ensure Time Machine (TM) can connect to make future backups.

Once those are complete, TM picks a band size to be used by the sparse bundle. This is typically 256 MB for storage of around 4 TB, giving the maximum number of band files as 16384. This should be recorded in the log, for instance as
Using a band size of 256 MB (max bands set to 16384, image size 3.74 TB)
The file system within that sparse bundle is set to be Case-sensitive APFS, as it would be on local storage.

Checking the sparse bundle

Once the sparse bundle has been created, TM checks it for "runtime corruption", as it does before starting each backup to it. These checks can take significant time to complete: an empty 4 TB sparse bundle might require more than 3 seconds, although that should fall to around 1 second on subsequent backups.

These checks are performed primarily by com.apple.DiskImages2 and its service /usr/libexec/diskimagesiod, which give a blow-by-blow account in the log. They work through SMB (as smbfs) to attach and mount the sparse image, and perform a check using fsck, which should be reported as returning a status of 0, indicating a clean file system. These appear similar to those normally reported when attaching and mounting sparse bundles, with the added complication of SMB as the intermediary network file system. When checking these in the log, it's important to note that a sparse bundle normally contains more than just the single APFS volume, and the volume you want is usually the last to be attached and mounted.

Key log entries seen marking this for a sparse bundle named MacStudio.sparsebundle might read:
Checking for runtime corruption on '/Volumes/.timemachine/ASUSTOR (Time Machine: SMB)._smb._tcp.local./5A7D3A8D-E473-4E14-AD30-CE2FB67C4BA2/Public/MacStudio.sparsebundle'
Successfully attached using DiskImages2 as 'disk4' from URL '/Volumes/.timemachine/ASUSTOR (Time Machine: SMB)._smb._tcp.local./5A7D3A8D-E473-4E14-AD30-CE2FB67C4BA2/Public/MacStudio.sparsebundle'
Runtime corruption check passed for '/Volumes/.timemachine/ASUSTOR (Time Machine: SMB)._smb._tcp.local./5A7D3A8D-E473-4E14-AD30-CE2FB67C4BA2/Public/MacStudio.sparsebundle'

If your Mac reports a problem attaching or mounting the backup sparse bundle, then it's worth locating the time of the first of those log entries, perhaps by viewing only Time Machine entries in that log browser in Mints. Round that time down to the nearest second, then browse the whole log for a period of 10 or more seconds from that time using Ulbow. Entries should then reveal full details of exactly what failed, why, and whether any attempt was made to repair it using fsck.

Checking performance

The next step is relatively new, and consists of two checks of write performance on the backup storage, the first for a single 50 MB file, then for a rapid succession of 500 4 KB files. The latter test appears prone to failure on network storage, though, with results like
Checking destination IO performance at "/Volumes/Backups of MacStudio"
Wrote 1 50 MB file at 315.88 MB/s to "/Volumes/Backups of MacStudio" in 0.158 seconds
Failed destination write test with error Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out". Wrote 246 KB across 60 files.

No significance seems to be attached to such failures, though. Again, these are readily read using Mints.

Completing the backup

The final notable log entry for a first backup records setting of the quota:
Set quota for '/Volumes/Backups of MacStudio' to none
On completion of that first backup, the log records
Closing device lock assertion taken at 2023-01-31-043531 with reason: Backup Completed.

I hope these log landmarks prove useful for anyone trying to diagnose problems with backing up to network storage. While T2M2 remains a useful tool for checking on TM backups over a network, because of their added complexity you'll find the Time Machine log browser in Mints of more use, particularly when displaying only Time Machine entries, and turning off the other three, DAS, CTS and other.

Comment
Like
Tip icon image You can also reply to this email to leave a comment.

Unsubscribe to no longer receive posts from The Eclectic Light Company.
Change your email settings at manage subscriptions.

Trouble clicking? Copy and paste this URL into your browser:
http://eclecticlight.co/2023/02/01/backing-up-to-network-storage-checks-and-balances/

Powered by WordPress.com
Download on the App Store Get it on Google Play
at January 31, 2023
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

[New post] Godzilla Library Edition by James Stokoe, John Layman, Chris Mowry, Alberto Ponticelli, Dean Haspiel

...

  • Open for a sneak peek inside August's box 👀
    Spoiler alert... ...
  • [New post] Everyone Wants to Be a Cat
    Donna...
  • Your Ambitious Menu: 5 recipes to cook this week
    New on Ambitious Kitchen ...

Search This Blog

  • Home

About Me

PH News Net
View my complete profile

Report Abuse

Labels

  • 【ANDROID STUDIO】Data Binding
  • 【ANDROID STUDIO】Data Binding Show or Hide Progressbar
  • 【ANDROID STUDIO】Data Binding with object
  • 【ANDROID STUDIO】Live Data
  • 【ANDROID STUDIO】Live Data with Data Binding
  • 【ANDROID STUDIO】View Model
  • 【ANDROID STUDIO】ViewModel Data Binding
  • 【ANDROID STUDIO】ViewModel Data Binding Factory
  • 【FLUTTER ANDROID STUDIO and IOS】Common Weight and Mass Conversions
  • 【FLUTTER ANDROID STUDIO and IOS】custom lite rolling switch
  • 【FLUTTER ANDROID STUDIO and IOS】Managing State
  • 【FLUTTER ANDROID STUDIO and IOS】Simple Stopwatch
  • 【FLUTTER ANDROID STUDIO and IOS】Specify Height and Width in Percent with respect to the screen
  • 【FLUTTER ANDROID STUDIO and IOS】tab key or shift focus to next text field
  • 【FLUTTER ANDROID STUDIO and IOS】Weight Convert
  • 【GAMEMAKER】Display
  • 【GAMEMAKER】Draw Name
  • 【GAMEMAKER】enemy fire continously
  • 【GAMEMAKER】Energy
  • 【GAMEMAKER】Explosion
  • 【GAMEMAKER】Health Bar
  • 【GAMEMAKER】Hearts
  • 【GAMEMAKER】Highscore
  • 【GAMEMAKER】Horizontal Shooter
  • 【GAMEMAKER】Inventory
  • 【GAMEMAKER】keep the player facing the mouse pointer
  • 【GAMEMAKER】one way to do a fog of war
  • 【JAVASCRIPT】implements draggable progress bar
  • 【JAVASCRIPT】Math Quiz GAME export CSV
  • 【LARAVEL】PHPWord pass dynamic values when export to ms docx and download using PHPWord
  • 【PYTHON OPENCV】Image classification in Keras using several models for image classification with weights trained on ImageNet
  • 【PYTHON PYTORCH】metric classification accuracy
  • 【PYTHON PYTORCH】metric classification report
  • 【PYTHON】algorithm compare all classification models
  • 【PYTHON】algorithm evaluation k fold cross validation
  • 【PYTHON】leave one out cross validation
  • 【PYTHON】metric confusion
  • 【PYTHON】metric regression mae
  • 【VISUAL Csharp】Enumerate network resources
  • 【VISUAL Csharp】File Properties
  • 【Visual Studio VB NET】Clear Saved Passwords
  • 【Visual Studio VB NET】Swap mouse button
  • 【Visual Studio VB NET】System Properties Remote
  • 【Visual Studio Visual Csharp】Get computer name
  • 【Visual Studio Visual Csharp】Get Disk Free Space
  • 【Visual Studio Visual Csharp】Get processor type
  • 【Visual Studio Visual Csharp】IP Address
  • 【VISUAL VB NET】Delete Form Data
  • 【VISUAL VB NET】Delete History
  • 【VISUAL VB NET】Hibernate
  • 【VISUAL VB NET】Keyboard Properties
  • 【VISUAL VB NET】Sound
  • 【VISUAL VB NET】Tray Icon
  • 【VISUAL VB NET】Web Browser
  • 【Vuejs】 table implements adding and deleting
  • 【VUEJS】seamless carousel effect Marquee using transition

Blog Archive

  • October 2023 (25)
  • September 2023 (1209)
  • August 2023 (1224)
  • July 2023 (1259)
  • June 2023 (1245)
  • May 2023 (1194)
  • April 2023 (1137)
  • March 2023 (1163)
  • February 2023 (1107)
  • January 2023 (1313)
  • December 2022 (1358)
  • November 2022 (1353)
  • October 2022 (1300)
  • September 2022 (1208)
  • August 2022 (1279)
  • July 2022 (1228)
  • June 2022 (1164)
  • May 2022 (1176)
  • April 2022 (1184)
  • March 2022 (1337)
  • February 2022 (1232)
  • January 2022 (1321)
  • December 2021 (1932)
  • November 2021 (3065)
  • October 2021 (3186)
  • September 2021 (3078)
  • August 2021 (3175)
  • July 2021 (3198)
  • June 2021 (3136)
  • May 2021 (1856)
Powered by Blogger.