The database 'new' sub-command
- The new command is a sub-command of the hkeydb command.
- It creates a new database file within the current directory, and is the first step in setting up a new database for a project.
-
new
- Creates a new Hyperkey database file in the current directory, named "_hkey.db.txt", and makes it the Hyperkey 'current database'.
- If the hkeydb command was invoked from the right-click menu in Windows, the 'current directory' will be set from the file or folder that was clicked upon.
-
EXAMPLES:
-
Create a new database in the current folder, and be prompted for
the project name:
-
cd /home/myuser/Documents/Project1
/home/myuser/Documents/Project1> hkeydb
COMMAND? new
CREATE DATABASE FILE "/home/myuser/Documents/Project1/_hkey.db.txt"? [N] y
--------------------------------------------
CREATING NEW DATABASE IN:
"/home/myuser/Documents/Project1/_hkey.db.txt"
--------------------------------------------
TITLE FOR DATABASE FILE? [Optional] Project1
USING DATABASE IN "/home/myuser/Documents/Project1/_hkey.db.txt" AS DEFAULT
--------------------------------------------
NEXT STEP: SET DEFAULT SERVER PATHS USING 'INIT' COMMAND
1. EXIT HYPERKEY PROGRAM
2. NAVIGATE TO THE SERVER FOLDER LOCATION
IF USING A GNOME DESKTOP:
* OPEN A BROWSER WINDOW
* NAVIGATE TO THE SERVER FOLDER LOCATION
* RIGHT-CLICK AND CHOOSE 'Open in Terminal' FROM THE MENU
IF USING A COMMAND LINE:
* CD TO THE SERVER FOLDER LOCATION
3. ENTER 'hkeydb' TO RESTART 'HYPERKEY'
4. THEN SELECT 'INIT' OPTION
--------------------------------------------
COMMAND? x
- An empty database file is now created in the given folder.
- If the database will be used to do backups, then the server location must be defined within the database.
- As the banner text suggests, the user must exit the hkeydb command, then directly navigate to the server location that pairs with the local location, and then re-invoke the hkeydb command again and use the init sub-command.
-
-
Create a new database in folder '/home/myuser/Documents' for project
"project2":
-
cd /home/myuser/Documents/Project2
/home/myuser/Documents/Project2> hkeydb -new -project "project2"
- This executes the new sub-command directly, without waiting for a prompt. The messages and prompts will be the same as for the first example above.
-
-
Create a new database in the current folder, and be prompted for
the project name: