-
Notifications
You must be signed in to change notification settings - Fork 0
restore
Sean Akahane-Bryen edited this page Jul 26, 2020
·
4 revisions
Restores a specified backup of the notes directory.
The macro uses Keyboard Maestro's "Trash File" action to move the current notes directory to the trash, rather than rm
to delete it.
# First, take a backup.
cp -a "${KMVAR_Instance_Notes_Directory%/}" "$KMVAR_Instance_Backup_Directory/$(date "+%Y-%m-%d, %H.%M") - Before Backup Restoration"
# Restore the chosen backup.
cp -a "${KMVAR_Instance_Backup_to_Restore%/}" "${KMVAR_Instance_Notes_Directory%/}"
# Fetch the folder name for the success notification.
echo "${KMVAR_Instance_Backup_to_Restore##*/}"
Version | Date | Changes |
---|---|---|
1.01 | 2020-07-26 | Remove unnecessary globbing; add success notification |
1.00 | 2020-07-26 | Initial commit |