Im currently trying to create a "shallow" backup of my whole filesystem, meaning that I should be able to somehow backup the current full filesystem structure, including mainly file ownerships and permissions, without the actual files contents for a fast "snapshot" of the filesystem in case I mess up the permissions at some later point, so I would be able to restore the ownerships and permissions recursively in such case.
The main objectives are:
- The backup is very small in size since its only containing metadata (preferrably only ownership and permissions attributes)
- The backup is fast(er) to create compared to an actual backup
- The backup should be able to be restored 1:1 to the original target (ignoring new files missing from the backup)
Would this be possible e.g. using rsync, tar or similar tools?
A similar question was asked here.
However, Im looking for a full/comprehensive solution to the problem and objectives described.