Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
36b1c7a
feat(rear): exclude hard disks with COVE_RESCUE label
svlv Oct 3, 2025
5b8fc5c
feat(rear): fix device path
svlv Oct 3, 2025
1808d7b
feat(rear): fix review comments
svlv Oct 6, 2025
a96c594
Merge branch 'develop' into feature/BCF-5849-support-bare-metal-recov…
svlv Oct 10, 2025
c9eb11c
feat(rear): chagens for Azure environment
svlv Oct 10, 2025
9492b7b
feat(rear): add logging
svlv Oct 10, 2025
49f63b3
feat(rear): fix typo
svlv Oct 10, 2025
c8c2d94
Merge branch 'develop' into feature/BCF-5849-support-bare-metal-recov…
svlv Oct 14, 2025
136e340
feat(rear): add more strict check for Azure
svlv Oct 14, 2025
95c8149
feat(rear): correct detecting bootloder type in Azure
svlv Oct 15, 2025
9c9614b
Merge pull request #37 from nable-backup/release/2.9-6-cove
ashaulou Oct 17, 2025
127a9ca
feat(cove): backup and restore partition guids
svlv Oct 20, 2025
4a42888
feat(cove): add fallback for cases when blkid is not available
svlv Oct 21, 2025
5db6c3b
feat(cove): apply review comments
svlv Oct 23, 2025
e6e25a3
feat(cove): non-consecutive partitions are fine
svlv Oct 24, 2025
863800c
feat(cove): unknown partition type is fine
svlv Oct 24, 2025
c95123b
feat(cove): add break from loop
svlv Oct 24, 2025
782a581
feat(cove): try lsblk without PARTUUID
svlv Oct 24, 2025
9632de8
feat(bm): Added notification if BMR session was interrupted
krzysztof04 Oct 31, 2025
d4ebf6e
Merge pull request #41 from nable-backup/feature/BCF-5816-rear-system…
NastyaKapskaya Nov 4, 2025
e2d8892
Merge pull request #40 from nable-backup/feature/BCF-5930-rear-system…
NastyaKapskaya Nov 5, 2025
5c83444
feat(bm): Review fixes
krzysztof04 Nov 5, 2025
3538b6b
Merge pull request #32 from nable-backup/feature/BCF-5849-support-bar…
ashaulou Nov 5, 2025
37f65f5
feat(cove): detect secure boot
svlv Nov 5, 2025
9eacf32
Merge branch 'develop' into feature/BCF-5872-rear-backup-and-restore-…
svlv Nov 6, 2025
a0cf3b8
feat(bm): Review fixes
krzysztof04 Nov 6, 2025
a85e45e
Merge branch 'develop' into feature/BCF-5911-Notify-a-user-that-the-r…
krzysztof04 Nov 6, 2025
2a8b04f
feat(bm): Review fixes
krzysztof04 Nov 6, 2025
307a4a7
feat(bm): Review fixes
krzysztof04 Nov 6, 2025
d0cb64e
feat(cove): prepand system paths to PATH
svlv Nov 7, 2025
5481bce
feat(rear): blkid
BarysBarysenka Nov 13, 2025
6bae57f
feat(bm): Review fix: moved warning to be triggered when layout code …
krzysztof04 Nov 13, 2025
8e6101d
Merge pull request #44 from nable-backup/BCF-5902-rear-efi-entry-for-…
ashaulou Nov 13, 2025
520e7d6
feat(cove): remove dangling EFI entries during BMR
svlv Nov 14, 2025
8e7d6db
feat(bm): Review fixes
krzysztof04 Nov 17, 2025
8895b79
feat(cove): move has_binary back
svlv Nov 18, 2025
a46d5d1
Merge pull request #39 from nable-backup/feature/BCF-5872-rear-backup…
ashaulou Nov 18, 2025
81a8a17
feat(cove): minor change
svlv Nov 18, 2025
2338650
Merge branch 'develop' into feature/BCF-5873-rear-remove-dangling-efi…
svlv Nov 18, 2025
3d768b5
feat(cove): address review comments
svlv Nov 19, 2025
a6520f4
Merge pull request #43 from nable-backup/feature/BCF-5911-Notify-a-us…
ashaulou Nov 19, 2025
308aa86
feat(bm): Report an error in case of missing boot loader
krzysztof04 Oct 31, 2025
ba01eb5
feat(bm): Review fixes
krzysztof04 Oct 31, 2025
2a4a764
feat(bm): Review fixes
krzysztof04 Nov 5, 2025
5d24b38
Merge pull request #46 from nable-backup/feature/BCF-5873-rear-remove…
ashaulou Nov 20, 2025
e5860cc
feat(ci): add github actions for release branch and tag
svlv Nov 21, 2025
55d2da7
Merge pull request #49 from nable-backup/feature/BCF-5917-rear-ci-add…
NastyaKapskaya Nov 21, 2025
7467694
feat(cove): update workflow name for release branch creation
svlv Nov 21, 2025
68c49df
Merge pull request #51 from nable-backup/feature/BCF-5917-rear-ci-add…
NastyaKapskaya Nov 21, 2025
0fc1cc5
Merge pull request #42 from nable-backup/feature/BCF-5926-Print-final…
ashaulou Nov 21, 2025
6e374d3
Merge pull request #45 from nable-backup/feature/BCF-5671-add-blkid-t…
ashaulou Dec 3, 2025
0e4f156
feat(rear): unit tests
BarysBarysenka Dec 3, 2025
040feb9
Merge pull request #56 from nable-backup/feature/BCF-6186-run-unit-te…
NastyaKapskaya Dec 3, 2025
0824d2b
feat(rear): unit tests
BarysBarysenka Nov 27, 2025
8c81006
feat(rear): unit tests
BarysBarysenka Dec 3, 2025
eeb5a2d
Merge pull request #54 from nable-backup/feature/BCF-6186-run-unit-te…
NastyaKapskaya Dec 4, 2025
d748c20
feat(rear): unit tests
BarysBarysenka Dec 5, 2025
d372914
Merge pull request #61 from nable-backup/feature/BCF-6186-run-unit-te…
BarysBarysenka Dec 8, 2025
6babb40
feat(rear): unit tests
BarysBarysenka Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/create-release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Create release branch

on:
workflow_dispatch:
inputs:
jira_ticket:
description: "Jira ticket to create PR (e.g. BCF-7777)"
type: string
required: true

permissions:
contents: write
pull-requests: write

jobs:
create-release-branch:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: develop

- name: Configure Git
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"

- name: Authenticate GitHub CLI
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token

- name: Determine version
id: determine_version
run: |
inc_version=$(git tag \
| grep -E '^[0-9]+\.[0-9]+-[0-9]+-cove$' \
| awk -F'-' '{print $(NF-1)}' \
| sort -n \
| tail -1)
inc_version=$((inc_version + 1))
version="2.9-$inc_version-cove"
echo "Version: $version"
echo "version=$version" >> $GITHUB_OUTPUT

- name: Create release branch
env:
VERSION: ${{ steps.determine_version.outputs.version }}
run: |
git checkout -b release/$VERSION
git push origin release/$VERSION

- name: Create PR to master
env:
VERSION: ${{ steps.determine_version.outputs.version }}
JIRA_TICKET: ${{ github.event.inputs.jira_ticket }}
run: |
gh pr create \
--base master \
--head release/$VERSION \
--title "${JIRA_TICKET}: Merge release/$VERSION to master" \
--body "Automated release PR"
45 changes: 45 additions & 0 deletions .github/workflows/create-release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Create release tag

on:
push:
branches:
- master

permissions:
contents: write

jobs:
create-release-tag:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master

- name: Configure Git
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"

- name: Determine version
id: determine_version
run: |
inc_version=$(git tag \
| grep -E '^[0-9]+\.[0-9]+-[0-9]+-cove$' \
| awk -F'-' '{print $(NF-1)}' \
| sort -n \
| tail -1)
inc_version=$((inc_version + 1))
version="2.9-$inc_version-cove"
echo "Version: $version"
echo "version=$version" >> $GITHUB_OUTPUT

- name: Create release tag
env:
VERSION: ${{ steps.determine_version.outputs.version }}
run: |
git tag $VERSION
git push origin $VERSION
126 changes: 126 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
@Library('cove')
import nable.cove.helpers.ShellHelper
import nable.cove.SecretManager

final String jobName = env.JOB_NAME.split('/')[-2]
final String branchName = env.CHANGE_BRANCH ?: env.BRANCH_NAME
final boolean isProd = jobName.endsWith('-prd')
final boolean isProdBranch = branchName == 'master' || branchName.startsWith('release')
final String envType = isProd ? 'prd' : 'dev'

def String repositoryName = 'rear'

def config = [
cloud: "backup-${envType}",
serviceAccount: "backup",
buildImage: "${nsbuild.ecrHost()}/cove/onprem/develop/rear-builder:v1.7"
]

def secrets = [
jenkins: [
'github-app': [
usernamePassword: [
usernameVariable: 'GITHUB_USERNAME',
passwordVariable: 'GITHUB_PASSWORD'
]
]
],
kubernetes: [
'artifactory': [
'JFROG_USERNAME': 'ARTIFACTORY_USERNAME_COVE',
'JFROG_ACCESS_TOKEN': 'ARTIFACTORY_TOKEN_COVE'
]
]
]

def secretManager
def shellHelper
def shouldBuild = true

pipeline {
agent {
kubernetes {
cloud "${config.cloud}"
yaml nsbuild.agentYaml(config)
defaultContainer nsbuild.defaultContainer(config)
}
}

options {
ansiColor('xterm')
}

stages {
stage('Prepare') {
steps {
script {
if (isProd != isProdBranch) {
echo "Environment mismatch: isProd=${isProd}, isProdBranch=${isProdBranch}. Skipping build."
shouldBuild = false
}

secretManager = new SecretManager(
this,
envType,
jenkinsWhitelist: [
'github-app'
],
k8sWhitelist: [
'artifactory'
]
)
shellHelper = new ShellHelper(this, isUnix: true)
}
}
}
stage('Load secrets') {
when {
expression { shouldBuild }
}
agent {
kubernetes {
cloud "${config.cloud}"
yaml secretManager.getK8sPodYaml(secrets)
defaultContainer 'secrets'
customWorkspace 'w'
}
}
steps {
script {
secretManager.loadJenkinsSecrets(secrets.jenkins)
secretManager.loadK8sSecrets(secrets.kubernetes, shellHelper)
}
}
}
stage('Build') {
when {
expression { shouldBuild }
}
environment {
ARTIFACTORY_URL = 'https://mspsolarwinds.jfrog.io/artifactory'
}
steps {
script {
secretManager.withSecrets {
shellHelper.exec('Validate', """
make validate
""")
shellHelper.exec('Run unit tests', """
make test-cove
""")
shellHelper.exec('Build', """
make dist
""")
def repository = (envType == 'dev') ? 'cove-generic-develop-local' : 'cove-generic-release-local'
shellHelper.exec('Upload', """
PACKAGE="rear-\$(make version).tar.gz"
curl -sSf -X PUT -T dist/\${PACKAGE} \
-u \${ARTIFACTORY_USERNAME_COVE}:\${ARTIFACTORY_TOKEN_COVE} \
\${ARTIFACTORY_URL}/${repository}/rear/\${PACKAGE}
""")
}
}
}
}
}
}
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ else
git_date := $(shell git log -n 1 --format="%ai")
git_ref := $(shell git rev-parse HEAD | cut -c 1-8)
git_count := $(shell git rev-list HEAD --no-merges | wc -l)
git_branch_suffix = $(shell git symbolic-ref HEAD | sed -e 's,^.*/,,' -e "s/[^A-Za-z0-9]//g")
git_branch_suffix = $(shell echo "$${CHANGE_BRANCH:-$${BRANCH_NAME:-$$(git symbolic-ref HEAD || echo unknown)}}" | sed -e 's,^.*/,,' -e "s/[^A-Za-z0-9]//g")
git_status := $(shell git status --porcelain)
git_stamp := $(git_count).$(git_ref).$(git_branch_suffix)
ifneq ($(git_status),)
Expand Down Expand Up @@ -101,6 +101,7 @@ help:
\n\
version - Show ReaR version used\n\
validate - Check source code\n\
test-cove - Run COVE unit tests with bats\n\
install - Install Relax-and-Recover (may replace files)\n\
uninstall - Uninstall Relax-and-Recover (may remove files)\n\
dist - Create tar file in dist/\n\
Expand Down Expand Up @@ -153,6 +154,16 @@ validate:
fi; \
done

test-cove:
@echo "== Running COVE unit tests =="
@for test_file in tests/COVE/*.bats; do \
echo ""; \
echo "========================================"; \
echo "Executing: $${test_file}"; \
echo "========================================"; \
bats "$${test_file}"; \
done

man:
@echo -e "\033[1m== Prepare manual ==\033[0;0m"
$(MAKE) -C doc man
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Relax-and-Recover Linux Disaster Recovery & Bare Metal Restore

Relax-and-Recover (abbreviated ReaR) is the de facto standard disaster recovery framework on Linux.
Relax-and-Recover (abbreviated ReaR) is the de facto standard disaster recovery framework on Linux.

It is in particular used on enterprise Linux distributions like Red Hat Enterprise Linux (RHEL)
and SUSE Linux Enterprise Server (SLES).
Expand All @@ -10,7 +10,7 @@ for bare metal disaster recovery with data backup restore on physical or virtual

For bare metal disaster recovery the ReaR recovery system is booted on pristine replacement hardware.
On replacement hardware first the storage setup/layout is recreated (disk partitioning, filesystems, mount points),
then a backup restore program is called to restore the data (system files) into the recreated storage,
then a backup restore program is called to restore the data (system files) into the recreated storage,
and finally a boot loader is installed.

System administrators use the ReaR framework to set up a disaster recovery procedure
Expand Down
24 changes: 24 additions & 0 deletions containers/builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ARG CONTAINER_REPO=263262308774.dkr.ecr.eu-west-1.amazonaws.com

FROM ${CONTAINER_REPO}/ns/mirror/prd/library/debian:12.11-slim

RUN apt-get update && \
apt-get install -y \
git \
bats \
bash \
coreutils \
curl \
make \
&& rm -rf /var/lib/apt/lists/*

ARG user=build
ARG group=build
ARG uid=1000
ARG gid=1000

RUN groupadd -g "${gid}" "${group}" \
&& useradd -l -c "Build user" -d "/${user}" -u "${uid}" -g "${gid}" \
-s /bin/bash -m "${user}"

USER build
2 changes: 1 addition & 1 deletion doc/user-guide/06-layout-configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ disk <name> <size(B)> <partition label>

=== Partitions ===
----------------------------------
part <disk name> <size(B)> <start(B)> <partition name/type> <flags/"none"> <partition name>
part <disk name> <size(B)> <start(B)> <partition name/type> <flags/"none"> <partition name> <partition guid/"no-partuuid">
----------------------------------

=== Software RAID arrays ===
Expand Down
Loading