Good time of day to everyone!
NOTE: This is not a question, but a little announcement.
I've started a project
mkbck - Make Backup recently, and want to announce it here. I believe it can be useful for a lot of people, who use CLI for system administration.
A couple of years ago I've started working as system administrator. Quickly I figured out that having backup copies of important files at hand BEFORE you edit them makes you sleep better at night, instead of preparing another cup of coffee late at night, trying to make something work again.
I started using
# cp file file.date
before editing mentioned file, especially in /etc :-)
But it quickly became annoying to look at the clock and type date manually 5 times per minute.
I tried to find something to do it for me, and found nothing.
I wrote a simple shell script to perform a task. Shortly, simple cp+date inside was not enough for me. For example, i wanted to make backup and edit original in ONE command, and not two, and not bother about absolute and relative paths.
So I wrote mkbck:
Usage: mkbck [-mvVeh] [-d destination] [-s suffix] <target(s)>
Where: -m - move target instead of copying it
-e - edit target after backup
-h - display this help
-v - human readable verpose output
-V - machine parsable verbose output
format - cp/mv:dir/file:target:destination
target - file/directory to be backed up
-d dest - optional directory to place backup
into. Default is the target's base directory.
-s suffix - optional arbitrary suffix
The backup file name is : ${TARGET}.b.`date +"%Y%m%d-%H%M"`[-<COUNT>]
For example :
backup of mkbck on Mon May 30 16:55:05 IDT 2005
would be mkbck.b.[suffix.]20050530-1655
This script worked for 2 years in 3 very heterogeneous environments, and a couple of days ago I've uploaded it on
SourceForge.
I will be glad, if this script will be useful general public.