Backup not saving symlinked nextcloud folder?

Hi!

I finally made the upgrade to 22.04 on my Vultr instance (whew!)

There’s just one problem: I found out that Vultr offers cheaper HDD storage, so I created a HDD volume and basically did ln -s /mnt/owncloud /home/user-data/owncloud. I had to do this to have enough space to upgrade, even after I had spun off /home/user-data/backup to a similar volume.

Now, when I run MiaB’s backup process, I end up with a fairly small bunch of duplicity files, which judging from the size contains everything except that symlinked owncloud folder.

How do I fix this? Or, how can I separately safely backup the owncloud folder? I’ve tried rsyncing it but the owncloud.db file changes while I’m doing it.

There’s an option in duplicity to follow symbolic links (–copy-links) but you would need to hack the Mail in a Box backup code.
Alternatively, as you suggest you can make a separate backup of the owncloud folder. This can be automated by creating the file /home/user-data/backup/after-backup
If you make this an executable script, it will be automatically executed after a normal backup run.

1 Like

So, something like another duplicity backup of the owncloud partition specifically? I’ve never used duplicity manually before, I’ll have to take a hard look at how MiaB does it.

FWIW the backup destination (/home/user-data/backup/encrypted) is also a symlink, if it matters.

Edit: went ahead with adding --copy-links in the backup.py file, will see if that works. I’d kind of prefer to keep the totals in the admin interface correct.

Cool. I’m at least interested in any issues you encounter. Don’t forget that you need to apply the changes again on an update of Mail in a Box

1 Like

So far it seems it worked fine, or at least it produced a duplicity folder of the right size and shows the right size in the MiaB admin panel. I’ll try to download it to my PC and restore and see what the insides look like.

Cool. I’m at least interested in any issues you encounter. Don’t forget that you need to apply the changes again on an update of Mail in a Box

I restored the backup into a folder on my PC and had a look at the files and it seems things are there, so that’s working OK.

It would be really awesome if someone could add a pref somewhere to do symlinks so we don’t need to do this after each sudo mailinabox. I know this is meant to be a minimal, mail-only program, but I bet a lot of people are using the Nextcloud part too and that can quickly get out of hand, as far as drive space goes.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.