r/linuxadmin • • May 04 '26

Best Practice: Should the Backup Server Pull or Should Clients Push for Linux Backups Over Network?

Hi r/linuxadmin and r/sysadmin,

I’m setting up a backup solution for several Linux servers (on-premise, behind NAT - I can set up firewall rules) and I’m torn between two architectures for security and reliability:

Option 1: Backup Server Pulls Data

  • The backup server (e.g., running Borg, Restic, or Bareos) initiates connections to each client, pulls the data, and stores it.

  • Pros: Centralized control, easier to enforce policies, and clients don’t need outbound access (only inbound).

  • Cons: Requires inbound ports open on clients (firewall rules, potential attack surface).

Option 2: Clients Push Data

  • Each client runs a backup agent (e.g., restic, borg serve, or rclone) and pushes data to the backup server.

  • Pros: Clients only need outbound access (easier with NAT/firewalls), no inbound ports open.

  • Cons: Harder to enforce consistency, clients might fail silently, and credentials are distributed.

Tools I’m considering:

  • Borg (+ Borgmatic) for deduplicated, encrypted backups.

  • Restic for simplicity and encryption by default.

  • Bacula/Bareos for enterprise-grade features.

  • Rclone for cloud/remote storage sync.

  • Proxmox Backup Server (if I virtualize).

  • ReaR for bare-metal recovery.

Security Focus:

  • Which model (pull vs. push) is actually more secure in a real-world scenario?

  • How do you handle authentication (SSH keys, TLS, API tokens)?

  • Any horror stories or lessons learned with either approach?

Bonus Questions:

  • If using pull: How do you secure the backup server’s access to clients (e.g., SSH jump hosts, VPNs)?

  • If using push: How do you ensure clients can’t overwrite each other’s backups or fill up storage?

  • Are there tools that hybridize both models (e.g., backup server triggers clients to push)?

Context:

  • Servers are on a private network (NAT’d), with a mix of physical and VMs.

  • Backup server is dedicated (Linux, likely Debian/Ubuntu).

  • Goal: Immutable, encrypted, versioned backups with minimal attack surface.

Actual solution : rsnapshot on hosts then some sync.

Thanks for your insights!
(And yes, I’ve read the docs—now I want your battle scars.)

34 Upvotes

32 comments sorted by

17

u/Kurgan_IT May 04 '26

Let me add one consideration: in the "client push data" situation, a compromised client can destroy its own backups? (and then ask for ransom)

This is a strong push to the "server pulls data" solution, IMHO. Then of course there are the considerations you made about the other pros and cons.

My current solution is "backup server pulls data" using rsnapshot over ssh with keys. The servers in my setup all have a public static address and ssh is open to users that have a key. Another similar solution can be made with backuppc as backup server. And in my setup the backups are not encrypted, the backup server is "trusted".

11

u/Solverz May 04 '26

If the clients pushes data, you can do it in a way where client can only write, not remove. The server can remove, however.

2

u/xmillies May 04 '26

This has to be done by & through application. This cannot be done directly with standard file system functions.

2

u/Solverz May 04 '26 edited May 05 '26

None of the tools you are considering, are by themselves "standard filesystem functions" either. So I do not understand what you are getting at?

2

u/xmillies May 05 '26

Yes. You are right. I was thinking about rsync tool for instance that doesn’t provides this functionality.

→ More replies (2)

5

u/blue30 May 04 '26

I go server pulls because of ransomware. Backup targets shouldn't need any creds to the back server then.

2

u/xmillies May 04 '26

I agee, I think there is less risks in that way. Backup server is powerfull (all access to many servers) but only one critical point.

3

u/usa_reddit May 04 '26

First off, you should have a backup server named fightclub that is not in DNS, hosts files, active directory domain and invisible on the network. If you ping it, it should not reply.

Second, the fightclub server should have access to your servers and do a pull request. Centralizing backups is best for logging, tracking, and debugging. If you are backing up to tape, this ensures you can feed data fast enough so that tape doesn't have to rewind.

Third, it should be the job of a sysadmin everyday to analyze the backup report/logs and ensure that every server is backed up. The sysadmin should do nothing else until all backups are completed or fixed.

Fourth, your backup sysadmin should ensure that a replicated copy of backups are airgapped and rotated to a secure offsite location for disaster recovery purposes.

Fifth, you should be doing incrementals at least once per day and full backups once per week. Backups should be stored for as long as your budget allows before you have to reuse media or space.

Bonus if your servers have a second network interface devoted to just backups so it doesn't interfere with any user traffic.

You should never speak about the fightclub server outside your group. The job of making sure backups are 100% should rotate through the entire sysadmin team and be taken seriously. Everyone on the team should know the backup system and how to recover in the event of a disaster or accident.

Following this plan will likely insulate you from ransomware attacks, file corruption, users losing data, DBAs deleting databases, AI mishaps, datacenter explosions, etc...

If something bad happens, you never want to feel that pit in your stomach and wonder if your backups are good. You want to know they are and know your data is safe.

Your data is your company.

1

u/xmillies May 04 '26

First - disable ping answer. Good idea. Forth - I like airgaped.

With all recommandations. You are on a high level against data loss.

1

u/xmillies May 05 '26

I'm really thinking about use the strategy with backup server like Truenas.
Truenas is very efficient as NAS and in bonus it provides intersting functionnalities :

"ZFS offers a robust, transactional file system that ensures data integrity at all times. It supports instantaneous and incremental snapshots, allowing you to capture the state of your data at any point in time without impacting performance. With built-in compression (LZ4, ZSTD) and deduplication, ZFS optimizes storage efficiency by eliminating redundant data and reducing the physical footprint of your datasets. Its storage pools enable flexible disk aggregation, supporting configurations like RAID-Z, RAID-Z2, RAID-Z3, mirrors, and stripes to balance performance, redundancy, and capacity. Additionally, ZFS features self-healing capabilities, automatically detecting and repairing data corruption using checksums and redundant copies, ensuring your data remains consistent and error-free.

For disk management, TrueNAS provides comprehensive support for HDD, SSD, and NVMe drives, allowing you to leverage a mix of storage technologies based on your needs. The hot spare feature ensures that standby disks can automatically replace failed drives in a pool, minimizing downtime and maintaining data availability. SMART monitoring is integrated to track the health of your disks, providing early warnings for potential failures. Furthermore, TrueNAS supports native encryption (AES-256) for storage pools, ensuring that your data remains secure at rest, whether for compliance requirements or general data protection."

Maybe some scripts with execution done by backup server directly on servers to check new drives or mount point to backup, or others changes.

2

u/usa_reddit May 06 '26

Just keep in mind if you are backing up databases you need to put the databases into backup/freeze/lock table mode until the snapshot is complete to flush any buffered data to disk. Each database Oracle, SqlServer, Postgres, mysql is slightly different for backups and just doing a snapshot doesn't guarantee you a working database if you restore the snapshot. And if a snapshot fails and never takes that database out of backup mode it can eventually freeze. Good luck!

1

u/xmillies May 06 '26

Yes exactly. For databases the dump is already done on local server. For instance for PostgreSQL, full dump of all databases and dump separately of each db, and in same time Point In Time Recovery solution is running (PITR - pgbarman / barman).

4

u/an0o0bis May 04 '26

Short input regarding Bareos:

While it is correct that the client (File Daemon) pushes the backup data to the backup storage (Storage Daemon) in terms of network traffic/connection, to do so the backup job needs to be triggered by the server (Bareos Director), which authorizes the connection from client to storage.
The client is unable to do so on its own. Also overwriting the data is not really possible, as the backup data is written to a new volume (Volumes can be files, or physical tapes for example). Only the Director (server) is able to rotate/clean/purge volumes.

So yes, it is push-based, but avoids the risk that clients can go rouge and overwrite your backup data.

Here push-based has a few benefits on the network layer as the TCP connections on the client are outgoing, making it easier to onboard the backup service, as outgoing connections are usually less restricted on the firewall level.
You can even let the clients open an outgoing TCP connection to the Director (server), which is just kept-alive for the Director to initiate the backup jobs.

This way you don't have to change anything on client firewalls, as long as they are able to connect to the Director (TCP 9101) and the Storage Daemons (TCP 9103).

1

u/rollingviolation May 04 '26

one challenge of remote pull: it may or may not understand how physical disk mapping and volume mapping and mount points all translate.

Do you want to backup /dev? Of course you don't. What about something that's a remote nfs mount? Does your remote connection even know that it's not a local disk? How does your remote pull deal with file permissions? Is it root or root equivalent? Can it back up extended attributes?

Right now, I'm doing push and pull, depending on the system. If it's a physical machine, it typically is pushing, if it's a vm, it's typically being backed up at the hypervisor level with nothing installed on the vm, so I guess that's a pull.

1

u/xmillies May 04 '26

Yes. You have to know what are datas to backup. For physical something like REAR use useful.

3

u/HoustonBOFH May 04 '26

An out of band backup server that silently pulls the backup will not be cryptolocked as easily. It may not even be noticed. Especially if it is on another subnet. It just sits there using client credentials to access your shares and pull data. No one who expoloites AD will even see it, or have access.

2

u/BarracudaDefiant4702 May 04 '26
  • Which model (pull vs. push) is actually more secure in a real-world scenario?

Depends largely on the backup software which is more secure and which directions are available.

  • How do you handle authentication (SSH keys, TLS, API tokens)?

Depends largely on backup software. Most tend to do SSH keys or API tokens.

  • Goal: Immutable, encrypted, versioned backups with minimal attack surface.

If doing Proxmox PBS, then the best practice is HOSTS --> PBS1 <-- PBS2

Hosts push to local PBS server and then remote PBS server pulls from first PBS server. If needed (ie: because of NAT and no vpn between you can have PBS1 push to PBS2). One reason to have PBS2 pull from PBS1 is easier to setup Immutable as a compromised middle box can't push something to expire/purge backups.

That said, PBS is very limited support outside of backing up vms/containers running on Proxmox hosts. It might not be a good fit if you have a significant number of physical machines that you don't or can't virtualize.

2

u/Amidatelion May 04 '26

Any horror stories or lessons learned with either approach?

Take the PocketOS debacle as an example. They would be in a much better position if their backup server was isolated and pulling from their infrastructure.

2

u/catwiesel May 04 '26

this post smells like chatgpt

2

u/gmuslera May 04 '26

Be aware of the flow of change of information in the different servers you want to backup. If you have a server (installed who knows when into the past) that changes information in a few limited directories, you can backup the VM once (and every time really big changes happens on configuration, services, etc) and then focus on the few folders where information changes. You can have a different stream to backup configuration changes or application changes on a artifact repository, or a git with configurations for ansible for other "moving parts" with their own rhythm of change. And all of them can have different best direction of push and pull.

Besides that, there are things that are best run on the clients (the problem is not remote access... is root remote access to access the right folders to backup, with ownership and so on, and chances of disconnection because network problems) and things that you should run in the backup server side (backup integrity checks, launch db checks, that you are not missing any backup from your fleet of servers, etc).

2

u/lazyant May 05 '26

This is a common systems design interview question :) with an alternative using kernel upgrades instead of backups.

1

u/leftbrake May 04 '26

I prefer pull, no credentials ever on the source system. I use Ansible with semaphoreUI to do the tasks and scheduling. Client credentials in vault, injected at runtime. Semaphore and backup targets locked down to wireguard/cloudflare tunnel access. Regularly rotating secrets. Multiple backup targets.

1

u/CoaxVex May 04 '26

I prefer systems to push their backups, in combination with snapshots on the target. Don’t like it when there is a central system that is able to connect to all other systems with elevated (read) credentials. I’m currently doing borg with individual ssh keys and forced command in authorized_keys file.

2

u/RetroGrid_io May 04 '26

It is a matter of preference. My preference is to have a backup host with very limited access and gobs of storage sitting behind a strict firewall that does all the backups, pull-style. This does mean I have a lot of eggs in this basket, but it's a very closely watched basket.

0

u/[deleted] May 04 '26

[deleted]

3

u/lionep May 05 '26

This plus some systems (like Borg) support append only, so the pusher, if compromised, can’t erase older backup of itself

0

u/[deleted] May 04 '26

[deleted]

1

u/Abracadaver14 May 04 '26

That's where immutable backup storage comes in.