Giter VIP home page Giter VIP logo

bitup's Introduction

BitUp

What is this repository for?

  • BitUp is an application to backup git repositories from Bitbucket.
  • It is possible to store all repositories of specific Bitbucket Teams in Azure File Storage or to save them locally.

Installation

Bitbucket prerequisites

First you need to generate api keys for every team. To do that navigate to the team page and click on the button in the upper right corner "Manage team". The keys are needed to configure the application.

bitbucketapikey

Preparing Azure

The next step is to create an Azure Storage Account. Go to the Azure Portal and sign in. Now you can navigate to "Storage accounts (classic)".

storage

Here click "Add" to add an storage account.

addstorage

Give it a unique name, change settings and click "Create".

createstorageaccount

Now you can add a storage container clicking on the created storage account then "Overview" --> "Files" --> "+ File share". Choose a name for the storage container, set a sufficient quota (to limit max size) then click "Create".

createstorage

You find the key needed for the config file at "Keys" --> "Primary Access Key".

storagekeys

Configuration

Edit the DataOne.BitUp.exe.config file.

config

  1. BitbucketTeams: A collection of strings with all names of teams to backup the repositories of. A string consists of the team's ID and the API-Key of it, separated by a semicolon.

  2. AzureStorageContainer: The name of an Azure Storage Container. It has not to exist but has to fit the naming rules: Azure Storage Naming Rules

  3. AzureAccountName: The name of an already existing Azure Storage Account.

  4. AzureAccountKey: The primary Key of the specified Azure Storage Account.

  5. StoreInAzure: A boolean value on which it depends if the backups will be saved locally or in Azure. Possible values are: True or False.

  6. SmtpHost: The smpt host of the mail server you want to use to send the log mail after each run.

  7. EmailAccount: An email account with which the log mail will be sent.

  8. EmailPassword: The corresponding password of the stated email account.

  9. SendMailTo: The email account to receive the log mail.

  10. SmptPort: The used port of the smtp host. Default values are 25 or 587, but which one will work depends on the host.

  11. MailFrom: The sender of the log mail. It is not needed to change this value.

Execution

Local

To run the application locally just execute the DataOne.BitUp.exe.

As Azure Web Job

If you want to use Azure to run it use the following steps to create a Web Job.

  1. Create a zip file containing all files from the original DataOne.BitUp.zip but where you changed the settings in the config file as you need them.

  2. Navigate to "App Services" in the Azure Portal.

    • azureportal
  3. Add a new Web App (or use an existing one).

    • addwebapp
  4. Choose an unique name for your App and click "Create".

    • createwebapp
  5. Navigate to "WebJobs" and click "Add".

    • addwebjob
  6. Give it a name and upload the DataOne.BitUp.zip file containing the updated config file.

    • Choose type "Triggered" and decide when you want the application to run.
    • To run it manually set "Triggers" to "Manual".
    • To run it at a specific time set "Triggers" to "Scheduled" and specify a valid CRON expression.
    • createwebjob
  7. If you set "Triggers" to "Manual" you can run the Web Job with a click on "Run" as shown in the next picture.

    • runwebjob

Done!

After a run you find your repository backups in the Azure Storage Container or in a local directory ./DataOne.BitUp.RepositoryBackups if you ran the application locally.

Note that only repositories that changed since the last run (assumed that it was 24 hours ago) will get backed up!

bitup's People

Contributors

doadmin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

stevenschmitt

bitup's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.