There are several servers under CentOS with PHP projects, and the task is to make a server (or servers) for them to store yesterday's versions of uncompressed files of all projects from all servers, while simultaneously synchronizing lists of users and giving them access to the appropriate folder, as on the original server. It would seem that the task is not difficult? What implementation options I could come up with:
- Create one common backup server, where project files + groups + users from each server will be copied every night using rsync. But in this case, difficulties arise with the user UIDs; it will be necessary to reassign them on the backup server, plus change the owners of the files. And it is unknown how rsync will react to a different owner, since if it downloads the entire file each time, this option is unacceptable.
- Create backup servers according to the number of source servers, copy all project files + groups + users every night using rsync. The UIDs of users and groups on the files will be correct, however, it will be necessary to manually split the backup partition into several small ones in order to mount them to different servers. And manually adjust their size if necessary. And I wouldn’t want to increase the number of backup servers.
- Use svn/git for this and create a separate repository for each project. It would be possible to store the entire history of changes for all projects, but this option is also not without flaws, starting at least with user synchronization, and ending with the need to create .git/.svn directories that may already exist on client projects.
Has anyone encountered similar tasks? Maybe there are some opensource projects that implement all the necessary functionality? Thank you!