Multiserver Backup Directory Naming Collision
Summary
In a multiserver setup where two or more servers use the same external mount point for backups, the backup files for the ispconfig directory get mixed up. Both servers save their backups to a directory with the same name, leading to a file collision and making it impossible to perform a clean restore for either server.
Steps to reproduce
- Set up a multiserver environment with at least two servers.
- Configure both servers to use the same external mount point (e.g., a network-attached storage or NFS share) for backups.
- Run an ISPconfig update with backup on both servers.
- Check the backup directory on the external mount point.
Correct behaviour
Each server should save its ispconfig directory backup to a unique and identifiable directory. The directory name should include a unique identifier like the server ID or hostname to avoid collisions.
Environment
Server OS + version: Ubuntu 20.04 ISPConfig version: 3.3.0p2
Proposed fix
The ispconfig directory name in the backup process should be changed to include a unique server identifier. For example, instead of a generic name, the directory could be named ispconfig_[hostname] or ispconfig_[server-id]. This simple change would ensure that each server's backups are kept in a separate, dedicated directory on the shared mount point.