AaronV77 / Monday

Scripts that create aliases in order to be able to push and pull from a central storage server that you can have at home.
GNU General Public License v2.0
0 stars 0 forks source link

Validation #9

Closed AaronV77 closed 5 years ago

AaronV77 commented 5 years ago

A nice feature to have is some validation that we are making sure that what we are "pushing" / "pulling" to and from the server is the same. My solution to adding this feature is taking the size of the directory and making sure that when we transfer the contents, that the transferred size is the same as the local. This will have to go into both scripts.

AaronV77 commented 5 years ago

Quick Note: The original way that I was going to solve this validation enhancement was to take the literal size of either the file or directory, but this ended up being wrong. This is due to each distro having different filesystems and each filesystem having different implementations. So, the sizes don't match across different distros.

Use: df -T to see what type of filesystem you are using.

New Solution: Rather than throw in the towel, lets just take the number of files and directories of the passed in argument to at least make sure that all the files / folders have made it to the remote system.