You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5549afd
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ The service runs as LocalSystem, keeps its state (`agent.yaml`, caches, logs) in
60
60
61
61
### Database backups
62
62
63
-
`fallbck-agent` backs up **PostgreSQL** (`pg_dump` per database + `pg_dumpall --globals-only`, and/or `pg_basebackup` with streamed WAL), **MySQL/MariaDB** (`mysqldump`/`mariadb-dump --single-transaction` with the binlog position, one `--all-databases` file or one file per database, optionally the binary logs written since the previous run) and **MongoDB** (`mongodump --oplog`, restorable with `--oplogReplay`) on every host where the vendor client tools are installed. The agent detects the tools at start and every ten minutes and reports them with its heartbeat (`db_tools`, shown as a *DB tools* badge on the Agents page); database jobs can then be assigned to it. Nothing else changes: same enrollment, same service, same data directory as the filesystem backups.
63
+
`fallbck-agent` backs up **PostgreSQL** (`pg_dump` per database + `pg_dumpall --globals-only`, and/or `pg_basebackup` with streamed WAL), **MySQL/MariaDB** (`mysqldump`/`mariadb-dump --single-transaction` with the binlog position, one `--all-databases` file or one file per database, optionally the binary logs written since the previous run) and **MongoDB** (`mongodump --oplog`, restorable with `--oplogReplay`) on every host where the vendor client tools are installed. The agent detects the tools at start and every ten minutes and reports the engines it can back up with its heartbeat (`db_engines`, shown as a *DB: postgres, mssql* badge on the Agents page; `mssql` is always among them); a database job can be assigned to an agent that reports the job's engine. Nothing else changes: same enrollment, same service, same data directory as the filesystem backups.
64
64
65
65
```bash
66
66
apt install fallbck-agent postgresql-client mariadb-client # or the tools for the engines you back up
@@ -73,6 +73,12 @@ Database jobs are created in the Web UI (job type *Database*: engine, host, user
73
73
74
74
Restore: `proxmox-backup-client restore <snapshot> db.pxar <dir>` (or download the manifest blob first) and follow `restore.commands` in `fallbck-db.json`. The `oci.fi/fallbck/agent:tools` image (target `tools` of `Dockerfile.agent`) ships the client tools; the Linux packages rely on the distribution's `postgresql-client`, `mariadb-client`/`mysql-client` (binary-log fetching additionally needs `mysqlbinlog`/`mariadb-binlog`, which Alpine only ships in the `mariadb` package) and `mongodb-database-tools`. `pg_dump` must be at least as new as the server; the agent looks in the usual per-version directories (`/usr/lib/postgresql/*/bin`, `/usr/pgsql-*/bin`, `/usr/libexec/postgresql*`) or `db_backup.tools.postgres_bindir`.
75
75
76
+
**Microsoft SQL Server** is backed up natively, with no client tools: the agent runs `BACKUP DATABASE` / `BACKUP LOG ... TO DISK` over its built-in driver, SQL Server writes the files into a directory on its own host, and the agent moves them into its spool, uploads them as `db.pxar` and deletes them. Every `fallbck-agent` therefore reports the `mssql` engine; the usual setup is the agent installed on the SQL Server host itself (Windows service or Linux package). Job options: **mode** `auto` (a full backup when none is held, when the chain broke or when the last full is older than *full every N days*, a differential otherwise), `full`, `differential` or `log` (transaction log only, as its own job on a short schedule); *also back up the log* after each full/differential for databases in the FULL or BULK_LOGGED recovery model; native compression (off by default: PBS deduplicates uncompressed backups far better, and Express cannot compress); copy-only. `master` is always backed up in full, `tempdb` never, offline databases and snapshots are skipped with a note.
77
+
78
+
The agent keeps the chain it holds per database (last full, last differential, the log backups since) in its job state and compares it with `msdb` before every run: when the server's newest full backup is not the one FallBCK holds — another tool took one, or a run failed after the backup — the next differential becomes a full (*chain reset*), and a log backup that does not start where the previous held one ended is reported as a *log chain gap*. The run page lists every backup set with its LSNs and the reason for its type, and the restore commands give the chain in order: `RESTORE DATABASE ... WITH NORECOVERY` for the full and the newest differential, `RESTORE LOG` for the logs, then `WITH RECOVERY` (add `STOPAT` for a point in time).
79
+
80
+
Where the files land: by default the instance's **default backup path** (`InstanceDefaultBackupPath`), which the SQL Server service can write and an agent on the same host can read. A job may name another directory; when SQL Server runs elsewhere or in a container, give both views of the same directory: `backup_dir` as SQL Server sees it and `agent_dir` as the agent sees it (UNC share, bind mount). A probe file verifies the two match before any backup runs. Authentication is a SQL login (password on the job or in a credential profile) or, with the user left blank on Windows, integrated authentication as the agent's service account (LocalSystem needs a login with backup rights, e.g. `db_backupoperator` in every database or `sysadmin`). `host\\instance` selects a named instance. SQL Server jobs cannot run on a Kubernetes agent, because the backup file would be written inside the SQL Server pod.
81
+
76
82
### Kubernetes agent
77
83
78
84
`fallbck-k8s-agent` runs **inside** the target cluster (agent type `kubernetes`, one identity per install) and backs up **all API resources** plus **PVC data**: with CSI snapshots it takes a `VolumeSnapshot`, clones it to a temporary PVC and uploads the files; without snapshot support it mounts the live volume read-only (crash-consistent). Install with the Helm chart:
|`pkg/agent/dbbackup`| database engines (PostgreSQL, MySQL/MariaDB, MongoDB by their client tools; Microsoft SQL Server natively over the built-in driver with full/differential/log chains): tool detection, prechecks, dumps, spool, state |
66
66
|`cmd/fallbck-k8s-agent`| in-cluster Kubernetes agent (Helm-installed; `worker` mode uploads one volume, `db-worker` mode dumps one database on the engine image) |
67
67
|`pkg/k8sbackup`| kubernetes job spec, discovery plan, run manifest (shared) |
68
68
|`pkg/pvebackup`| Proxmox VE host job spec and run manifest (shared) |
0 commit comments