rsync Server Backup, Minor Issues After Restore


Apr 16, 2007
For about 4 years now, I've been doing daily backups (in addition to other backups) of my entire cPanel server with rsync.

To do so, on another server with an identical size, identically partitioned hard drive as a secondary drive, I have been having cron run the following (in a shell script) early every morning:
rsync -azx -e ssh --delete /mnt/server_backup/boot/
rsync -azx -e ssh --delete /mnt/server_backup/tmp/
rsync -azx -e ssh --delete /mnt/server_backup/
"/tmp" and "/boot" are separate partitions, and yes, I know that copying "/tmp" is not necessary.

Yesterday, not realizing what I was doing, I deleted "/home/virtfs", which, due to the fact that much of its contents are bind mounts to other actual parts of the system, caused catastrophic system failure.

I was able to take the backup hard drive out of the other server and get this broken server to successfully boot from it. Everything seems to be working great including websites, email, and databases (all OK according to mysqlcheck).

Here comes my issue:

When I did the rsync backups as above, I have never used the "-H" (preserve hard links) option. I also don't think that that option would have applied to the "/home/virtfs" bind mounts (as they aren't actually hard links).

Now, there is absolutely no mention of "virtfs" in the output of "cat /proc/mounts" or the "mount" command. "/home/virtfs", however, is taking up about 5GB on the hard drive. I tested some of the files in "/home/virtfs/<username>/bin" to see if their inode numbers matched the inode numbers of the files with the same names in "/bin"; they didn't. I have also made sure that every account is not set to use the jailed shell.

Also, from my memory, it seems that some other places on a normally working CentOS 5.5 cPanel server use hardlinks. The Apache access logs come to mind, as I think they have the domain filenames in "/usr/local/apache/domlogs" and also the copies of the same in each "/usr/local/apche/domlogs/<username>" directory.

Does anyone forsee any problems I will have with files that were once hardlinks on the drive now instead being actual copies, other than that they are taking up extra space by being duplicates?

Can I now safely delete "/home/virtfs" to free up the space its occupying, as it seems to now just contain duplicate files rather than bind mounts?

Are there other places on the system besdies "/home/virtfs" that I can delete things that were once hard links or bind mounts but are now just duplicates taking up more space?

For my future rsync backups, should I use the "-H" option?

Any thoughts on this would be highly appreciated.
Last edited: