Score:0

Why dar won't allow me to unmount?

cn flag

I'm trying to make a multi-volume backup of a huge directory with DAR. This should be possible, according to the tutorial. Or at least used to be.

root@box:/# dar -R / -c mnt/backups/syncable -z -g home/myuser/spin/syncable -\\ home/myuser/spin/bigdir/Photos:home/myuser/spin/bigdir/src
# note: pwd is /

The idea here is to get all the files in /home/myuser/spin/bigdir and follow the two symlinks: Photos and src.

This takes over a day to run and gets interactive:

No space left on device, you have the opportunity to make room now. When ready : can we continue ? [return = YES | Esc = NO]

My understanding is I should now be able to umount /mnt/backups/, so I can replace it with an empty volume. No such luck:

⋊> /mnt sudo umount -f /mnt/backups                                                      
umount: /mnt/backups: target is busy.

⋊> /mnt sudo lsof /mnt/backups/                                                          
COMMAND     PID USER   FD   TYPE DEVICE      SIZE/OFF NODE NAME
dar     3129146 root    4u   REG  253,3 1967814266880   12 /mnt/backups/syncable.1.dar

⋊> /mnt sudo pwdx 3129146                                                                                                      
3129146: /

Without umounting /mnt/backups there's no way I'll be able to replace it with a second, empty drive, like in tutorial. What am I missing?

Score:0
cn flag

What I was missing was the '-p' options, that tells dar to pause after each slice. Unlike regular pausing when it runs out of space, this doesn't use the filesystem and allows user to change the underlying device.

Ended up using this command. It's still a bit awkward if you have devices which aren't the same size - you could in theory use small slices, say 100GB and fill 1T disk followed by a 1.5T disk followed by a 800G disk that way. Sadly I don't see a way to accomplish this without telling dar to continue over 30 times, even when no filesystem change is needed.

As this question saw virtually no traffic I'm accepting my answer for now, but it isn't a very useful solution if you're using random old drives. And if you're purpose buying drives, just buy larger than the source fs.

dar -s 1824019032K -p -c mnt/backups/syncable -z -g ./home/myuser/spin/syncable -\\ /home/myuser/spin/syncable/Photos:/home/myuser/spin/syncable/src -vd -vf
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.