1

EDIT: It appears this may not in fact be a Synology issue, as I'm now experiencing the same behaviour trying to run a Time Machine backup to a newly-formatted local USB drive.

I just bought a Synology DS220j mostly to replace my dying Airport Extreme, which I was using for Time Machine backups from my MacBook Pro (10.14.6). So far, I've been unable to complete a single TM backup to the Synology.

The main problem is that the backup always stops after backing up only a few tens or hundreds of megabytes, usually with no errors in the Time Machine preferences pane or in the Console, but very occasionally with a "Could not complete backup" notification.

I've tried doing a new backup from scratch, and I've tried seeding a backup from my last good sparsebundle file on my previous backup disk (after fsck-ing it for errors). I've tried over SMB, and I've tried over AFP (which I've now turned off again, as I know it's deprecated and generally doesn't play too well with Synology).

Currently, I'm running a cron job on my Mac that runs 'tmutil startbackup' every 5 minutes. This is my second attempt at that—the first time, it nearly got to the end after a couple of days, but then the "amount remaining to backup" just kept increasing faster than it was backing up, so that backup never finished either. (I don't think that's a Synology problem, though—seems to be a known issue when using TM with a NAS, though I don't know how to solve that either.)

Can anyone suggest anything to make this less painful, and preferably, Just Work?

calum_b
  • 5,921
  • 30
  • 37
  • You did enable the TimeMachine functionality on the Synology I assume? – nohillside Jan 23 '21 at 15:00
  • Yes, Bonjour Time Machine broadcast is turned on (SMB only, currently), and the folder in which I want to keep my TM backups is correctly selected. – calum_b Jan 23 '21 at 15:51
  • Did you set a disk quota for your user on the NAS which would prevent a full backup? – nohillside Jan 23 '21 at 16:00
  • I’m basically going to say, stop doing all the things you are. No seeds, no restrictions, just start with a clean minimal backup. Then after a week or month, you can add fancy steps or restrict if you think you need it. – bmike Jan 23 '21 at 16:11
  • @nohillside The user has a quota of 1Gb (can't set the quota on the folder, on this NAS model), which should be more than enough for the first backup of my 512Gb MacBook Pro. I've considered disabling or increasing the quota to see if it makes a difference, haven't tried it yet. – calum_b Jan 23 '21 at 17:11
  • 1 TB I assume? :-) – nohillside Jan 23 '21 at 17:56
  • Oops, yes of course :) – calum_b Jan 23 '21 at 18:38
  • Check the time machine log. During a backup open the backup directory, find the most recent .inProgress file > right click > show package contents > find the .log file. sudo tail -f /path/to/the/log/file.log during backup. Once it fails, see if theres any error and what stage it got up to. – user7886229 Jan 24 '21 at 04:26
  • @JBis Thanks, will try that next time. Currently building up a local backup first by adding folders back into the mix each time to see if any of them are causing a specific problem. – calum_b Jan 24 '21 at 13:13

2 Answers2

1

New information has come to light. The Mac may need directory repair, significant space freed or just an erase install based on multiple clean Time Machine starts failing.


It’s hard to pick apart backup issues with such a custom setup.

I recommend you start with the “nurse” procedure at the bottom of my answer - working up to fsck and safe boot as appropriate. Exclude three folders and let a minimal backup complete. Consider throwing away the old backups and starting with a clean slate, no restrictions or fancy settings - let Time Machine think it can use the entire disk.

/Users
/Library
/System

If the interface asks to skip all system files, say yes. Once you have hourly backups going well. Remove things from the exclusion one by one and focus on disk corruption on the source if that’s where the backups hang.

Also, disable cron forcing things while stability is not present. Let the normal triggers work until you’re solid is my advice. Also, The Time Machine Mechanic and Backup Loupe are invaluable tools for me working on problematic Time Machine situations. Yours seems overly not easy, so something is causing you pain that hopefully can be identified and remedied.

bmike
  • 235,889
  • I hope you get it sorted in short order. Everything you’re doing is based on very reasonable planning and experience from what I can see, @calum_b - please post your fix and accept it - my answer is a process and guideline and not a definitive fix of a specific issue. – bmike Jan 23 '21 at 17:44
  • Thanks. Interestingly, if I try to exclude everything from the TM backup bar one small root level folder, the estimated size still shows as 430Gb, and tinkering with the exclusion list never really changes that. Not sure if that's significant, or how to address it... – calum_b Jan 23 '21 at 18:39
  • Have you tried restarting the Synology? I have seen with mine (a 414), that occasionally the user will get wedged and hold a session open, and after that the Mac can't complete a backup because the Synology has the sparsebundle locked. I have the 'Connected Users' widget on the desktop, and kill the user when I see it there. Note that "occasionally" is measured in months, I just had it happen (which makes me remember it) and before that it was June last year. – Marc Wilson Jan 23 '21 at 18:44
  • Yes @calum_b , you have all the symptoms of a confused accounting of the source. Exclude everything and then let it rip... heck, you might try adding a USB direct attached drive so Time Machine can get a quick good backup and then reset the “calculations”. – bmike Jan 23 '21 at 18:47
  • @bmike Yeah, doing a local one was somewhere on my list of things to try too. I just tried excluding everything and it failed in the same way, but I have a faint recollection that if you try to exclude everything it will actually just ignore your exclusion list, so maybe that didn't really prove anything. – calum_b Jan 23 '21 at 19:03
  • @MarcWilson Yeah, have restarted it a couple of times. I've also been keeping my eye on the connected users widget, but haven't noticed anything out of the ordinary. – calum_b Jan 23 '21 at 19:04
  • Ok, just tried a local backup and that just fails silently too after a couple of minutes too. So I guess I can rule out a Synology issue after all. Anybody know how much free disk space is required for Time Machine to work properly in Mojave these days...? – calum_b Jan 23 '21 at 19:14
  • @calum_b you don’t need any more space than the drive to back up if there is no corruption. Your system may need Carbon Copy Cloner, SuperDuper or a different backup then an erase to get back to healthy. Is your previous backup good enough and complete? – bmike Jan 23 '21 at 19:30
  • @calum_b When setting up and running a Time Machine volume for the first time, it should give you an indication of whether it is of sufficient size. After that, the default operation is that the number of backups will be limited by the available space. Similarly to Git archives, changes to files are only saved as deltas of the original. – karolus Jan 23 '21 at 19:31
  • Thanks, but I meant how much space on the source drive, to make the snapshot that gets backed up. I currently only have about 11Gb / 2% free. I do have up-to-date SuperDuper backups, so yes, a reinstall is possible... though being a clone, that could also just reinstall the problem ;) (I guess a Mojave re-install might also be worth a shot first...) – calum_b Jan 23 '21 at 20:01
  • If you only have 11gb of 512gb free, you have a bigger problem than whether TM will complete a backup. – Marc Wilson Jan 23 '21 at 20:06
  • I’ve never seen a drive so unhealthy that 10 GB wasn’t enough to try a pruned, nursed backup. More space helps with speed, but shouldn’t impact a clean start. If you get a clean fsck in a safe boot, how much CPU is in use 5 minutes after a normal restart @calum_b - only a lot of background processes would stymy a clean backup in my experience after filesystem is known to be clean and healthy. – bmike Jan 23 '21 at 20:11
  • @MarcWilson Maybe, but I've survived quite happily for the past 5 years or so with roughly that amount of free space :) I've managed to clear it up to 30Gb for now to see if that makes any difference, though. – calum_b Jan 24 '21 at 13:15
  • The common recommendation is to have at least 10% free space for general health. Myself (both my Mac are 512gb SSD) I I usually keep the internal drive at 50%, that's what network storage is for. ^_^ I imagine that if the OS is trying to use snapshots for backups, the act of creating the snapshot, and thus locking the use of space for that snapshot for the duration of its existence, would negatively impact the OS. If it could complete the backup, it would release the snapshot. – Marc Wilson Jan 24 '21 at 18:07
  • Re your question earlier about how much space the snapshot takes up... it takes up the same amount of space as the amount of data you're trying to back up. But not additional space, further filesystem changes are a delta on top of the snapshot. I think it would be informative to watch the space on the volume as the OS tries to complete the TM backup and see what changes there are. – Marc Wilson Jan 24 '21 at 18:10
0

I have a solution.

I had the same issue using a USB3 external hard drive for Time Machine.

I downloaded Carbon Copy Cloner 6 and I made back up from it. The backup was successful with a warning. The warning was about a corrupted file, which was created by OneDrive. When I deleted it the Time Machine was able to finish too...

enter image description here

agarza
  • 2,274
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. – Community Oct 20 '23 at 22:20