Shows how to create a Mimic managed collection from an existing set of files.
Suppose you have an existing collection of files located at /my/data. To initialize the collection for mimic management you need to make /my/data you default directory with:
Then have mimic create its management files with (-v option is for verbose mode)
Then add all the files in the folder and sub-folders (-r option does a recursive add)
Now suppose you would like to mimic all the files to the host "my.remote.host.com". The account you would like to use on "my.remote.host.com" is "dda" and you would like the to refer to the task by the name "my-remote". The following with create the task:
To push the data to the remote use the command
Since the task is defined to use the "scp" protocol you will need to install your public certificate on my.remote.host.com under the "dda" account. To create a ssh key pair create a directory in the root folder your local account and make sure the permissions only allow the owner to read or write.
Create the public/private key pair in the ".ssh" directory with the commands
Do not enter a passphrase. This will eliminate any prompting when using the keys
Now copy the public key (*.pub) to the remote system and place it in the file "authorized_keys" in the ".ssh" directory of the user account you will login as. If the file "authorized_keys" exists, concatenate the public key to the file.
You will need to enter the password for the {remote-user} in order to complete the copy. After the public key is installed you will no longer be required to enter a password.
That's it!
You're now ready to synchronize files. You can run the "mimic-push" any time like
Since it's a command-line tool you can also include it in scheduled tasks (like cron) to automatically keep the copies synchronized. You can also have multiple destinations and if you run mimic-push without a task name it will run all push tasks.