-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mox backup
creates invisible files.
#172
Comments
The "mox backup" command asks the running mox server process to make the backup (over a ctl unix domain socket). So the destination path is interpreted by the running mox process. There's a good chance the destination path is part of some private mount namespace. I ran Are you also not seeing the file when backing up to a path like |
BTW: The I tried to add to the mox.service another directory in the At the end of the day the practical solution is to create the backup in the $MOXROOTDIR/data/tmp/backup A helper script looks like #!/bin/bash
MOXDIR=>>add your base directory for mox<<
MOXBACKUPDIR=${MOXDIR}/data/tmp/backup
rm -rf ${MOXBACKUPDIR}
./mox backup ${MOXBACKUPDIR}/data
./mox verifydata ${MOXBACKUPDIR}/data
cp -rp ${MOXDIR}/config/ ${MOXBACKUPDIR}/config and then do the real backup, i.e. restic. |
Are you getting many lines of output? Or are you running this under crontab and getting a message for each backup? |
Did a similar setup just now (added the path /var/backup-mox, which is mox user writeable, to the service definition) and did a backup
this time just this one line (it's a change between 0.0.10 vs 0.0.11, I believe). Suggestion exit code Suggestion |
thanks for testing & feedback. i tried clarifying the help output for the backup command. |
The above script solves my practical problem (that is, getting backups to happen) -- thanks! For the moment, that's sufficient for me, though I suspect either the documentation should clarify what's happening (systemd shenanigans) and that not any random location for the backup directory will work. Or alternatively, every random location should work, and the current behavior is a bug. In fact, maybe don't ask for a location at all? Since the message files in the backup are actually hardlinks, setting up a designated "snapshot" location somewhere in the home directory and creating a tar-able copy of the mail storage there should suit most uses. Also, one question remains: I have, apparently, created an invisible directory somewhere in |
I found mine in /tmp. /var/tmp could also be an option. It was in a directory of the form systemd-private--mox.service-. If you do a "find" in /tmp and /var/tmp for the name of the backup destination directory, it should show up. Using a fixed backup location would indeed prevent some of these problems. But custom locations should probably still be possible. Especially if the disk mox has its data on is getting full, it would be useful to backup to another partition. I'm also pondering if it makes sense to make mox initiate periodic backups, and calling a script to copy it off-site. I currently have a cronjob, but I'm not a fan. If builtin, we can deliver errors to the postmaster mailbox, and add prometheus metrics about success/failure. |
Only, I used
There needs to be some legit way to break out of the sandbox then.
Mox runs as |
So I have a mox home directory and want to create a backup to pack it up and send it to a backup server. Naively, I run
./mox backup <location>
as root, because all the other maintenance operations run fine as root......and end up with a directory that ostensibly exists (because when I run
mox backup
again, it says it does) but is not listed anywhere nor otherwise accessible.How do I even delete it now?...
The text was updated successfully, but these errors were encountered: