Modify a Linux Bash script to work in Mac OS X
Job Description We have a working Linux script that needs to be modified to work in Mac OS X. The main issue with the existing script running in Mac OS X is to do with differences between the date and stat commands in Mac OS X vs Linux. -- Description of the script: We run rsync at many locations for the purpose of backup. These rsync backups are then snapshotted using multiple methods such as hard links via rsync or using a native snapshotting method. The purpose of the software is to prune (remove old) snapshots taken by our rsync-based backup software. Assume that all snapshots are done via hardlinks within a filesystem. The code responsible for enumerating all existing snapshots needs to be a separate module/function/class to the code responsible for determining which snapshots to remove as we may add other snapshot methods in the future. For now, it will need to look at a directory listing of a folder that we specify as an argument when executing. The snapshots will all have a name with the following format: 2011-12-12-150659. We generate this by using the UNIX date command: `date "+%Y-%m-%d-%H%M%S"`. Snapshots will be divided into multiple categories according to their frequency as follows. Retention of each should be definable, even if only by constants that are defined within the code: - Hourly snapshots, default retention 48 hours from present - 4-hour snapshots, default retention 7 days from present - Daily snapshots, default retention 1 month from present - Weekly snapshots, default retention 1 year from present - Monthly snapshots, default retention 2 years from present In addition to the above definitions, there needs to be a definable maximum retention period. Any snapshots that reach the maximum age, regardless of the default retention values above, should be automatically removed. 'Present' is defined as the most recent snapshot that has been taken and not by the system time. The code responsible for determining which snapshots to remove needs to be a separate module / function / class to the code responsible for actually removing the snapshots as we may add other snapshot methods in the future. Keywords: Scripts & Utilities, os, mac, linux, unix, bash
| Expired |
More linux projects
View AllMore bash projects
View AllRelated projects
Search for freelance jobs
"I did not know what to expect at first. But my final impression once I used your site and service is a great one! Simply amazing!
I would recommend this service to any other freelance artists and co workers who are looking to expand their client base."
"The possibility to include all information about my freelance working places in just one website. It means, I don't need to tell my future employer to go to odesk, elance, etc. They can check everything about me in donanza website."




