Add borgbackup server

Use alpine 3.23
This commit is contained in:
Sander Koenders 2026-02-16 11:01:20 +01:00
parent fdbd2d145a
commit 65fc2dc320
3 changed files with 117 additions and 0 deletions

View File

@ -0,0 +1,49 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Sander Koenders (sanderkoenders)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://www.borgbackup.org/
APP="Alpine-BorgBackup-Server"
var_tags="${var_tags:-alpine;backup}" # Max 2 tags, semicolon-separated
var_cpu="${var_cpu:-2}" # CPU cores: 1-4 typical
var_ram="${var_ram:-1024}" # RAM in MB: 512, 1024, 2048, etc.
var_disk="${var_disk:-20}" # Disk in GB: 6, 8, 10, 20 typical
var_os="${var_os:-alpine}" # OS: debian, ubuntu, alpine
var_version="${var_version:-3.23}" # OS Version: 13 (Debian), 24.04 (Ubuntu), 3.23 (Alpine)
var_unprivileged="${var_unprivileged:-1}" # 1=unprivileged (secure), 0=privileged (for Docker/Podman)
header_info "$APP" # Display app name and setup header
variables # Initialize build.func variables
color # Load color variables for output
catch_errors # Enable error handling with automatic exit on failure
function update_script() {
header_info
if [[ ! -f /usr/bin/borg ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
$STD apk -U upgrade
msg_ok "Updated $APP LXC"
msg_ok "Updated successfully!"
exit 0
}
start
build_container
description
# ============================================================================
# COMPLETION MESSAGE
# ============================================================================
msg_ok "Completed successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Connection information:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}ssh backup@${IP}${CL}"
echo -e "${TAB}${VERIFYPW}${YW}To set SSH key, run this script with the 'update' option and select option 2${CL}"

View File

@ -0,0 +1,44 @@
{
"name": "Alpine-BorgBackup-Server",
"slug": "alpine-borgbackup-server",
"categories": [
7
],
"date_created": "2026-02-16",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": null,
"documentation": "https://www.borgbackup.org/",
"website": "https://www.borgbackup.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/borg.webp",
"config_path": "",
"description": "Alpine-BorgBackup-Server is a lightweight containerized backup server based on Alpine Linux and BorgBackup. It provides a secure and efficient way to manage your backups with minimal resource usage, making it ideal for Proxmox VE environments.",
"install_methods": [
{
"type": "default",
"script": "ct/alpine-borgbackup-server.sh",
"resources": {
"cpu": 2,
"ram": 1024,
"hdd": 20,
"os": "alpine",
"version": "3.23"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"type": "info",
"content": "After installation, use the 'update' option in the script to configure SSH access and/or password authentication."
},
{
"type": "info",
"content": "Refer to the official BorgBackup documentation for setup and usage instructions."
}
]
}

View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Sander Koenders (sanderkoenders)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://www.borgbackup.org/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing BorgBackup"
$STD apk add --no-cache borgbackup openssh
$STD rc-update add sshd
$STD rc-service sshd start
msg_ok "Installed BorgBackup"
motd_ssh
customize
cleanup_lxc