Host-based backup of VMware vSphere VMs.
Post Reply
Tom Hagever
Novice
Posts: 8
Liked: never
Joined: Sep 26, 2023 4:42 pm
Full Name: Tom babai
Contact:

how to backup mongo VMs? (Running on linux)

Post by Tom Hagever »

Hello, Im currently backing up Virtual Machines with many different applications running on them using VMware proxies and storage integration with my netapp. I have backup jobs for the DBs that veeam has application aware supporting it, however, most of my DBs in my environment are Mongo DB on linux VMs. When I tried to just backup and restore the VM the mongo service couldnt start even after I deleted the lock file, therefore, I was told that there are pre job scripts to bring the mongo databases to a state where they dont get messed up during the job. Is there a public script somewhere that I could get and add to my job?
Thanks in advance !
PetrM
Veeam Software
Posts: 3264
Liked: 528 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: how to backup mongo VMs? (Running on linux)

Post by PetrM »

Hi Tom,

There are no public scripts but I would try the pre-freeze/post-thaw scripts based on the fsync() and fsyncunlock() functions. Also, could you please share the error that you get when you try to start the service after a backup?

Which version of MongoDB do you have? For example, creating volume-level backups of instances using WiredTiger storage engine required that the data files and journal reside on the same volume, but I believe this limitation is relevant only to the versions before 3.2.
Do you use replica sets? If yes, how many?
Do you have sharded clusters?

Thanks!
BackupSlacker
Influencer
Posts: 15
Liked: 2 times
Joined: Aug 31, 2022 2:58 pm
Contact:

Re: how to backup mongo VMs? (Running on linux)

Post by BackupSlacker »

Might I suggest setting up a pre-backup script to dump and compress the database to a file and then have the snapshot created and then a post-backup script to delete it, then part of your restore can be to restore from the dump file that resides on the backed up VM. Obviously increases the backup/storage requirements.
PetrM
Veeam Software
Posts: 3264
Liked: 528 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: how to backup mongo VMs? (Running on linux)

Post by PetrM »

Hello,

Not sure that it's better than what I proposed above, but I think it's easier. But I guess you could run mongodump to a mounted folder, not necessarily to the local disk.

@Tom Hagever could you please tell us how it goes and if there is something we can help you with?

Thanks!
Post Reply

Who is online

Users browsing this forum: dkuser and 55 guests