Backups suddenly stopped working 2 weeks ago and after some investigations I don’t get any logs or email notifications (I used to get email with backup errors when it happened).
Can you help me sorting this out ? I don’t know where to start as all logs are empty.
Last user logs about backup (after that, nothing related to backups):
18 Nov 202105:11:17 BackupBackup created (Archive: 2021-11-18_05-11-11.tar).
Running /usr/local/hestia/bin/v-backup-users take some time after launch, but displays nothing afterward. No backup is created. Is there a way to make this command verbose ?
Running backup from the CLI will say that the backup process has been launched … but nothing will be created.
Any hints ? Also, it was nice to receive email when backups weren’t working, any idea how I could restore this feature ?
It’s totally weird, restart didn’t do anything but running the backup and checking at resources at the same time with htop I can see that zstd is running. I can even see the command launched … But at the end of the process no backup in the backup folder …
I was able to find out what’s going wrong. There is a permission issue on my database folder.
The backup logs are in /usr/local/hestia/log/backup.log.
In this file, I was able to see:
-- DB --
2021-11-29 10:20:38 username_database (mysql)
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
sh: 0: getcwd() failed: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
sh: 0: getcwd() failed: No such file or directory
exim: getting initial cwd failed: No such file or directory
Error: dump username_database failed
The issue now is that if I check permission under /var/lib/mysql/… every folders belongs to mysql:mysql. Are you using the mysql user to perform the database backups or am I supposed to change the permission, so root user can access them?
We create a file in a /backup/tmp.xxx/ folder and then dump the database in that file and gzip / zstd it. How ever I am wondering why it can access /backup/tmp.xxx/database folder
When using /usr/local/hestia/bin/v-backup-users during the process, I can see the tmp.xxx folder under backup. All subfolders seem to be created (dns, web mail …) and belonging to root:root.
Though the message is less verbose in the log:
When using the CLI to launch the backup I don’t see the tmp folder under backup/ (or I missed it, dunno) but then I get the verbose error message about folder permission.
No, I only have a symlink from /home/username/backups to /backup folder, which I created because I mount my server through ssh and wanted to be able to access the backup repo.
I tried changing permissions on /backup, which belongs to my username:username now, but putting it to root:root doesn’t seem to change anything.