Skip to content

Commit 9c03f28

Browse files
authored
Merge pull request #253 from github/sync-with-public
Sync with v3.7.0 of public backup-utils
2 parents 91a8a8a + d3bf7b6 commit 9c03f28

31 files changed

+345
-112
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "docker" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
13+
- package-ecosystem: "github-actions" # See documentation for possible values
14+
directory: "/" # Location of package manifests
15+
schedule:
16+
interval: "weekly"

.github/workflows/docker-image.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
11+
build-docker:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Build the Debian Docker image
18+
run: docker build . --file Dockerfile --tag backup-utils-debian:${GITHUB_RUN_ID}
19+
- name: Build the Alpine Docker image
20+
run: docker build . --file Dockerfile.alpine --tag backup-utils-alpine:${GITHUB_RUN_ID}
21+
- name: Run tests in Debian Docker image
22+
run: docker run backup-utils-debian:${GITHUB_RUN_ID} ghe-backup --version
23+
- name: Run tests in Alpine Docker image
24+
run: docker run backup-utils-alpine:${GITHUB_RUN_ID} ghe-backup --version
25+

.github/workflows/lint.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
name: Lint Code Base
22

33
on:
4+
push:
5+
branches-ignore: [master]
46
pull_request:
5-
branches-ignore:
6-
- 'master'
7+
branches: [master]
78

89
jobs:
9-
build:
10+
lint:
1011
name: Lint Code Base
1112
runs-on: ubuntu-latest
1213
steps:
1314
- name: Checkout Code
14-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
16+
with:
17+
# Full git history is needed to get a proper list of changed files within `super-linter`
18+
fetch-depth: 0
1519
- name: Lint Code Base
16-
uses: docker://github/super-linter:latest
20+
uses: github/super-linter@v4
1721
env:
1822
VALIDATE_ALL_CODEBASE: false
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build:
77
strategy:
88
matrix:
9-
os: ['ubuntu-20.04', 'ubuntu-18.04', 'macos-latest']
9+
os: ['ubuntu-22.04', 'ubuntu-20.04', 'ubuntu-18.04', 'macos-latest']
1010
fail-fast: false
1111
runs-on: ${{ matrix.os }}
1212
steps:
@@ -20,11 +20,11 @@ jobs:
2020
if: matrix.os != 'macos-latest'
2121
- name: Install Dependencies (macOS)
2222
run: |
23-
brew install gnu-tar shellcheck jq pigz coreutils gnu-sed gnu-getopt
23+
brew install gnu-tar shellcheck jq pigz coreutils gnu-sed gnu-getopt wget
2424
brew install moreutils gawk
2525
if: matrix.os == 'macos-latest'
2626
- name: Get Sources
27-
uses: actions/checkout@v2
27+
uses: actions/checkout@v3
2828
- name: Test
2929
run: |
3030
export PATH="$PATH:/snap/bin"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:stretch-slim
1+
FROM debian:buster-slim
22

33
RUN apt-get -q -y update && \
44
apt-get install -y --no-install-recommends \

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@
33
This repository includes backup and recovery utilities for
44
[GitHub Enterprise Server][1].
55

6-
**UPDATE**: The new parallel backup and restore beta feature will require [GNU awk](https://www.gnu.org/software/gawk) and [moreutils](https://joeyh.name/code/moreutils) to be installed. Note that on some distributions/platforms, the `moreutils-parallel` package is separate from `moreutils` and must be installed on its own.
6+
**Note**: The parallel backup and restore feature will require [GNU awk](https://www.gnu.org/software/gawk) and [moreutils](https://joeyh.name/code/moreutils) to be installed. Note that on some distributions/platforms, the `moreutils-parallel` package is separate from `moreutils` and must be installed on its own.
77

88
**Note**: the [GitHub Enterprise Server version requirements][2] have
99
changed starting with Backup Utilities v2.13.0, released on 27 March 2018.
1010

11-
### Features
11+
## Features
1212

1313
Backup Utilities implement a number of advanced capabilities for backup
1414
hosts, built on top of the backup and restore features already included in
1515
GitHub Enterprise Server.
1616

17-
- Complete GitHub Enterprise Server backup and recovery system via two simple
17+
- Complete GitHub Enterprise Server backup and recovery system via two simple
1818
utilities:<br>`ghe-backup` and `ghe-restore`.
19-
- Online backups. The GitHub appliance need not be put in maintenance mode for
19+
- Online backups. The GitHub appliance need not be put in maintenance mode for
2020
the duration of the backup run.
21-
- Incremental backup of Git repository data. Only changes since the last
21+
- Incremental backup of Git repository data. Only changes since the last
2222
snapshot are transferred, leading to faster backup runs and lower network
2323
bandwidth and machine utilization.
24-
- Efficient snapshot storage. Only data added since the previous snapshot
24+
- Efficient snapshot storage. Only data added since the previous snapshot
2525
consumes new space on the backup host.
26-
- Multiple backup snapshots with configurable retention periods.
27-
- Backup commands run under the lowest CPU/IO priority on the GitHub appliance,
26+
- Multiple backup snapshots with configurable retention periods.
27+
- Backup commands run under the lowest CPU/IO priority on the GitHub appliance,
2828
reducing performance impact while backups are in progress.
29-
- Runs under most Linux/Unix environments.
30-
- MIT licensed, open source software maintained by GitHub, Inc.
29+
- Runs under most Linux/Unix environments.
30+
- MIT licensed, open source software maintained by GitHub, Inc.
3131

32-
### Documentation
32+
## Documentation
3333

3434
- **[Requirements](docs/requirements.md)**
3535
- **[Backup host requirements](docs/requirements.md#backup-host-requirements)**
@@ -42,7 +42,7 @@ GitHub Enterprise Server.
4242
- **[How does Backup Utilities differ from a High Availability replica?](docs/faq.md)**
4343
- **[Docker](docs/docker.md)**
4444

45-
### Support
45+
## Support
4646

4747
If you find a bug or would like to request a feature in Backup Utilities, please
4848
open an issue or pull request on this repository. If you have a question related
@@ -53,3 +53,4 @@ instead.
5353
[1]: https://github.com/enterprise
5454
[2]: docs/requirements.md#github-enterprise-version-requirements
5555
[3]: https://support.github.com/
56+

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ For example, Backup Utilities 2.13.0 can be used to backup and restore all patch
66

77
There is no need to align Backup Utilities patch releases with GitHub Enterprise Server patch releases.
88

9-
When making a `.0` release, you will need to specify the minimum supported version of GitHub Enterprise Server that that release supports.
9+
When making a `.0` release, you will need to specify the minimum supported version of GitHub Enterprise Server that release supports.
1010

1111
Only repo administrator is allowed to run the release script, otherwise it will fail.
1212

STYLEGUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ rsync /data/user/db remote:/data/user/db
165165
---
166166
##### Use lowercase and uppercase variable names
167167

168-
Use lowercase variables for locals and internal veriables, and uppercase for variables inherited or exported via the environment
168+
Use lowercase variables for locals and internal variables, and uppercase for variables inherited or exported via the environment
169169

170170
```bash
171171
#!/usr/bin/env bash

backup.config-example

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,27 +64,23 @@ GHE_NUM_SNAPSHOTS=10
6464

6565
# If set to 'yes', ghe-backup jobs will run in parallel. Defaults to 'no'.
6666
#
67-
# WARNING: this feature is in beta.
6867
#GHE_PARALLEL_ENABLED=yes
6968

7069
# Sets the maximum number of jobs to run in parallel. Defaults to the number
7170
# of available processing units on the machine.
7271
#
73-
# WARNING: this feature is in beta.
7472
#GHE_PARALLEL_MAX_JOBS=2
7573

7674
# Sets the maximum number of rsync jobs to run in parallel. Defaults to the
7775
# configured GHE_PARALLEL_MAX_JOBS, or the number of available processing
7876
# units on the machine.
7977
#
80-
# WARNING: this feature is in beta.
8178
# GHE_PARALLEL_RSYNC_MAX_JOBS=3
8279

8380
# When jobs are running in parallel wait as needed to avoid starting new jobs
8481
# when the system's load average is not below the specified percentage. Defaults to
8582
# unrestricted.
8683
#
87-
# WARNING: this feature is in beta.
8884
#GHE_PARALLEL_MAX_LOAD=50
8985

9086
# When running an external mysql database, run this script to trigger a MySQL backup

bin/ghe-host-check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ port=$(ssh_port_part "$host")
5353
hostname=$(ssh_host_part "$host")
5454

5555
set +e
56-
# ghe-negotiate-version verifies if the target is a Github Enterprise Server instance
56+
# ghe-negotiate-version verifies if the target is a GitHub Enterprise Server instance
5757
output=$(echo "ghe-negotiate-version backup-utils $BACKUP_UTILS_VERSION" | ghe-ssh -o BatchMode=no $options $host -- /bin/sh 2>&1)
5858
rc=$?
5959
set -e
@@ -131,7 +131,7 @@ fi
131131

132132
# backup-utils 2.13 onwards limits support to the current and previous two releases
133133
# of GitHub Enterprise Server.
134-
supported_minimum_version="3.2.0"
134+
supported_minimum_version="3.5.0"
135135

136136
if [ "$(version $version)" -ge "$(version $supported_minimum_version)" ]; then
137137
supported=1

0 commit comments

Comments
 (0)