README improvements
Modified the README to include installation instructions and synchronized command line and README usage message.
This commit is contained in:
92
README.md
92
README.md
@ -1,33 +1,79 @@
|
|||||||
# tmimport
|
**Time Machine Utilities**
|
||||||
Time Machine Importer
|
==========================
|
||||||
|
|
||||||
tmimport.sh <backup drive>
|
|
||||||
|
|
||||||
Time Machine Importer modifies the metadata of a backup drive to match the
|
**Installation**
|
||||||
current computer's model and unique identifiers (primary MAC address and
|
----------------
|
||||||
hardware platform UUID/provisioning UDID) and attempts to 'inherit' the
|
Simply save the utility in your system path and mark it as executable.
|
||||||
backup history.
|
|
||||||
|
|
||||||
The backup drive should be specified by disk or volume name (or path) or
|
If you don't know your system path, you can find it with this Terminal command:
|
||||||
the mount point of the backup drive. If Time Machine Importer cannot find
|
|
||||||
an appropriate disk volume or mount point, it will check to see if the
|
|
||||||
specified directory is a valid Backups.backupdb location (or a machine
|
|
||||||
directory under one).
|
|
||||||
|
|
||||||
A future version may attempt to detect HFS+ or APFS partitions serving as
|
echo "${PATH}"
|
||||||
backup drives, and, if a backup drive is specified as a device path, it
|
|
||||||
will automagically choose the correct backup path.
|
|
||||||
|
|
||||||
# dirdedupe
|
To mark a utility as executable, use the `chmod` command:
|
||||||
Directory De-Duplication ("Dirty Dupe")
|
|
||||||
|
|
||||||
dirdedupe.sh [--execute] masterdir shadowdir
|
chmod +x tmimport.sh
|
||||||
|
chmod +x dirdedupe.sh
|
||||||
|
|
||||||
For each file in shadowdir, replace it with a hard link to the matching file
|
If you're still lost, do this:
|
||||||
(if any) in masterdir. A file will be considered a match if, and only if, it
|
1. In your Home folder, create a new folder called `.bin`
|
||||||
shares the same file name, relative path, and contents.
|
2. Download and save the utilities to your new `.bin` folder
|
||||||
|
3. Use a text editor to open `.zshrc` (or `.bash_profile` on older Macs)
|
||||||
|
from your Home folder and add the following line at the end:
|
||||||
|
|
||||||
|
`PATH=${PATH}:${HOME}/.bin`
|
||||||
|
|
||||||
|
4. In Terminal, run the following commands:
|
||||||
|
|
||||||
|
`chmod +x ~/.bin/*.sh`
|
||||||
|
|
||||||
|
5. Quit (or restart) the Terminal.
|
||||||
|
|
||||||
|
______________________________________________________________________________
|
||||||
|
|
||||||
|
|
||||||
|
**tmimport**
|
||||||
|
------------
|
||||||
|
TIME MACHINE IMPORT
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
|
||||||
|
tmimport.sh <backup drive>
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
|
Time Machine Importer modifies the metadata of a backup drive to match the
|
||||||
|
current computer's model and unique identifiers (primary MAC address and
|
||||||
|
hardware platform UUID/provisioning UDID) and attempts to 'inherit' the
|
||||||
|
backup history.
|
||||||
|
|
||||||
|
The backup drive should be specified by disk or volume name (or path) or
|
||||||
|
the mount point of the backup drive. If Time Machine Importer cannot find
|
||||||
|
an appropriate disk volume or mount point, it will check to see if the
|
||||||
|
specified directory is a valid Backups.backupdb location (or a machine
|
||||||
|
directory under one).
|
||||||
|
|
||||||
|
A future version may attempt to detect HFS+ or APFS partitions serving as
|
||||||
|
backup drives, and, if a backup drive is specified as a device path, it
|
||||||
|
will automagically choose the correct backup path.
|
||||||
|
______________________________________________________________________________
|
||||||
|
|
||||||
|
|
||||||
|
**dirdedupe**
|
||||||
|
-------------
|
||||||
|
DIRECTORY DE-DUPLICATOR
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
|
||||||
|
dirdedupe.sh [--execute] masterdir shadowdir
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
|
For each file in shadowdir, replace it with a hard link to the matching file
|
||||||
|
(if any) in masterdir. A file will be considered a match if, and only if,
|
||||||
|
it shares the same file name, relative path, and contents.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
|
||||||
--execute Actually remove and link duplicate files. By default, this
|
--execute Actually remove and link duplicate files. By default, this
|
||||||
program runs in test mode.
|
program runs in test mode.
|
||||||
|
|||||||
18
dirdedupe.sh
18
dirdedupe.sh
@ -21,18 +21,26 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
printusage() {
|
printusage() {
|
||||||
echo "
|
echo "
|
||||||
DIRECTORY DE-DUPLICATION (\"Dirty Dupe\")
|
DIRECTORY DE-DUPLICATOR
|
||||||
|
|
||||||
${0} [--execute] masterdir shadowdir
|
USAGE
|
||||||
|
|
||||||
For each file in shadowdir, replace it with a hard link to the matching file
|
dirdedupe.sh [--execute] masterdir shadowdir
|
||||||
(if any) in masterdir. A file will be considered a match if, and only if, it
|
|
||||||
shares the same file name, relative path, and contents.
|
DESCRIPTION
|
||||||
|
|
||||||
|
For each file in shadowdir, replace it with a hard link to the matching file
|
||||||
|
(if any) in masterdir. A file will be considered a match if, and only if,
|
||||||
|
it shares the same file name, relative path, and contents.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
|
||||||
--execute Actually remove and link duplicate files. By default, this
|
--execute Actually remove and link duplicate files. By default, this
|
||||||
program runs in test mode.
|
program runs in test mode.
|
||||||
|
|
||||||
|
MISC
|
||||||
|
|
||||||
|
The name of this utility is pronounced "dirty dupe."
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
34
tmimport.sh
34
tmimport.sh
@ -21,22 +21,28 @@ function dispusage() {
|
|||||||
printf "%s\n\n" "${1}"
|
printf "%s\n\n" "${1}"
|
||||||
fi
|
fi
|
||||||
echo "\
|
echo "\
|
||||||
Time Machine Importer"
|
TIME MACHINE IMPORT
|
||||||
echo
|
|
||||||
echo "\
|
|
||||||
Usage: ${0} <backup drive>
|
|
||||||
|
|
||||||
Time Machine Importer modifies the metadata of a backup drive to match the
|
USAGE
|
||||||
current computer's model and unique identifiers (primary MAC address and
|
|
||||||
hardware platform UUID/provisioning UDID), attempts to associate the primary
|
|
||||||
disk with the backup, and attempts to 'inherit' the backup history.
|
|
||||||
|
|
||||||
The backup drive should be specified by volume name or mount point. If the
|
${0} <backup drive>
|
||||||
backup drive is specified by the disk device name or path, Time Machine
|
|
||||||
Importer will try to find an HFS+ partition on it. If there is one, or if a
|
DESCRIPTION
|
||||||
partition name or path is specified, Time Machine Importer will attempt to
|
|
||||||
find the mount point and check for the existence of a Backups.backupdb
|
Time Machine Importer modifies the metadata of a backup drive to match the
|
||||||
folder.
|
current computer's model and unique identifiers (primary MAC address and
|
||||||
|
hardware platform UUID/provisioning UDID) and attempts to 'inherit' the
|
||||||
|
backup history.
|
||||||
|
|
||||||
|
The backup drive should be specified by disk or volume name (or path) or
|
||||||
|
the mount point of the backup drive. If Time Machine Importer cannot find
|
||||||
|
an appropriate disk volume or mount point, it will check to see if the
|
||||||
|
specified directory is a valid Backups.backupdb location (or a machine
|
||||||
|
directory under one).
|
||||||
|
|
||||||
|
A future version may attempt to detect HFS+ or APFS partitions serving as
|
||||||
|
backup drives, and, if a backup drive is specified as a device path, it
|
||||||
|
will automagically choose the correct backup path.
|
||||||
|
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user