mongo backup for linux VM in azure

arun kumar 71 Reputation points
2021-08-24T04:52:29.147+00:00

Hi Team

i am using mongodb database in one of the linux VM in azure infra and backed up that mongo db database to one of the folder inside linux VM itself.

i want to backup mongo database data to azure storage account and it should happen regularly everyday.

Please help me with the steps or tools or with the script that should backup the mongodb database data to azure storage account automatically everyday.

Thanks & Regards
Arun C V

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,826 questions
0 comments No comments
{count} votes

Accepted answer
  1. vipullag-MSFT 26,481 Reputation points
    2021-08-25T16:59:24.637+00:00

    @arun kumar

    As you already have mongodb backup on Linux VM, you can use the AzCopy utility to move the mongodb backup to azure storage account.

    Please refer this guide which has all the details on how to install, Authorize AzCopy methods and commands to move files to storage account.

    To get this running automatically everyday, you can setup a cronjob to do this.

    Also, I assume that you have a script for purging aged backup files to avoid piling of backup files on you vm overtime.
    If this is not setup, you should include this as part of your daily back maintenance cycle in the automation you are setting up through a Linux script.

    Hope this helps.
    Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.