Backup does not work at all due to moving log file error
guytish opened this issue · comments
When you run the mongodump command with --gzip and --archive options there is no output to stdout.
In logToFile function you're creating the file only if data length > 0.
Later, you're trying to move this log file (which not created) and it fails.
err = sh.Command("mv", log, planDir).Run()
if err != nil {
return res, errors.Wrapf(err, "moving file from %v to %v failed", log, planDir)
}
Hitting the same issue. From logs:
level=info msg="Backup started" plan=job
mv: can't rename '/tmp/job-1525306560.log': No such file or directory
level=error msg="Backup failed moving file from /tmp/job-1525306560.log to /storage/job failed: exit status 1" plan=job
There is actually a file /storage/job/job-1525306560.gz
but GCS upload did not happen.
This issue disappeared when I removed the database:
key for the configmap.
Hi, I'm with this error and idk what I need to do. Can anyone help me pls? 🙏
@marcelinhov2 - as @kvascz wrote, did you try to remove the database:?
Hey @guytish the problem was that my databases are not created. Shame on me!!!
I also get this as well.
INFO[0016] Backup started plan=config
mv: can't rename '/tmp/config-1557464760.log': No such file or directory
ERRO[0019] Backup failed moving file from /tmp/config-1557464760.log to /storage/config failed: exit status 1 plan=config
Check #76 - let me know if I didn't cover your use case. Its possible I didn't cater for code in other parts.