Repository backup

You can back up a branch in your repository by adding an SSH command that will trigger the upload of the newest version to a server after every push to that branch. Here’s how:

  1. Execute the following on the server where you want to keep the data:

     mkdir backup
     cd backup
     git clone --mirror repo_url_ssh
    $$$
  2. Open the project that you want to backup and go to Pipelines
  3. Add a new pipeline in the automatic mode and add the SSH action
  4. Provide the details of your server and set “backup/repo” as the working directory
  5. In the command field type the following:

    git remote update
    $

Once you save, the backup will be performed automatically on every push to the branch.

Last modified on April 26, 2022

Get Started

Sign up for free and deploy your project in less than 10 minutes.