software

From Cliquesoft
Revision as of 07:16, 22 August 2013 by Digitalpipe (Talk | contribs)

Jump to: navigation, search

Are you coming from a Microsoft Windows environment where software can be hard to locate and install? Or perhaps you are a bit confused on how to use dpkg (or if you should use aptitude) or some other Linux package management software and want an easiler solution. Welcome to our version of software package managment! This project is appropriately named 'software' and was designed to be easy and logical in its use. Not unlike our other bash-script-based software, this project relies on our clAPI framework for various functionality, so be sure this dependency is installed before using. It's also worth mentioning, when using this software from the command prompt, that the placement of the OPTION's must follow their respective ACTION (or parent script) which can be determined via the --help output. It might also help to read over the basics of clAPI to get a better understanding when running software from the command line.


License

This projects' codebase is licensed under the CPLv2 unless a valid CPLv1 license has been purchased. More information about both of these licenses can be found under the "Our Licenses" link of our homepage.



Installation

Installation could not be more easy! Currently it's a simple 2-step process which involves obtaining the actual software and then installing. To complete the first step, run the commands below. Please note that the last two commands accomplish the same goal and were included incase one was unavailable on your system.

$ mkdir /tmp/install

$ curl -# http://repo.cliquesoft.org/vanilla/all/software/stable -o "/tmp/install/software.soft"
  -OR-
$ wget --progress=bar http://repo.cliquesoft.org/vanilla/all/software/stable -O "/tmp/install/software.soft"

Now the second step can be accomplished using the following commands. After you execute the installation script, answer all the questions and your software will be ready for use!

$ cd /tmp/install
$ ./install



Using the CLI

ACTION's

You can see what actions are available to this project by running 'software --help' at the command prompt. Towards the top of that output, you will see a section entitiled "[PROJECT ACTIONS]" where a list will be presented for your review. Each action name should indicate what its function is, but in the event where it does not make sense, a small description to the right of each item has been included to help you to better understand. Below we will outline each action along with its associated options.


fix

This action is responsible for repairing any software that has been installed using this project. There are several tests that are run per execution of this action that include ownership, permissions, file integrity, and that dependencies are installed. If any of these checks fail, steps to resolve each problem will be presented upon completion. There are currently only two options that can be used with this action which we will cover below. It is important to note that using this action does NOT check for configuration errors, not issues with any data created by any software.

  • --all If this option was passed, then the user wants to run each of the afore mentioned checks against all of the currently installed packages. This can be a timely process depending on the speed of the device and how much software has been installed. If you are only interested in performing these tests on a particular package, then use the '--name' option instead of this option as outlined below:
$ software --verbose fix --all
  -OR-
$ software --verbose --name='bash' fix
  • --prefix This option was included mainly for system or network administrators, so the vast majority of users will not use this option. An example of its use would be where an admin might be working on a storage device that contains all the installed software for another device that currently does not start work work correctly. In that scenario, that storage device can be plugged into working equipment that can perform this task against it. So lets attach some details to this example. Lets say that a hard drive from a non-working device is plugged into a working system and is mounted to '/mnt/source'. An administrator can run this action on that drive by running the following command:
$ software --verbose fix --all --prefix='/mnt/source'


Restore OPTION's

  • --source provides the local directory or network share containing the backup archives to restore data from. For notes on how to enter network shares, please see the "Backup OPTIONS's" above. Also see the --sourceDir parameter.
  • --target indicates the local directory or network share that will receive the restored data. For notes on how to enter network shares, please see the "Backup OPTIONS's" above.
  • --sourceDir defines the directory contained within the --source that's actually containing the backup archives. This is similar to --targetDir in the "Backup OPTION's".
  • --sourceUser provides the username to access the --source in the event that its value is a network share only! If no username and password are required to gain access to the --source network share, then simply do not use this parameter or the following two.
  • --sourcePass provides the usernames corresponding password.

NOTE: later versions will use this to specify a password file for better security.

  • --sourceDom provides the optional domain as part of the credentials when authenticating to a network share.
  • --targetUser same as the --sourceUser parameter but for a --target network share.
  • --targetPass same as the --sourcePass parameter but for a --target network share.

NOTE: later versions will use this to specify a password file for better security.

  • --targetDom same as the --sourceDom parameter but for a --target network share.
  • --archive sets the path and filename of the (first) archive containing the data that the user wants restored. As an added benefit, this value can also contain just the prefix of a filename (e.g. '12345' instead of '12345.d.tgz') and the remaining extension will automatically be determined. Also see the --archives parameter below.
  • --archives specifies how many consecutive archives' data should be restored after the --archive, based on each archives date. If this value isn't defined, it is assumed to restore all data provided by --include from each successive archive until the end is reached. This is useful, for example, when restoring a complete system using the last full backup and its following incremental archives. Also please note, if you wanted to restore from 3 archives total, this value should actually be 2 since --archive always counts as 1.
  • --collapse removes the directory structure when restoring data with duplicate files being overwritten as restored.
  • --data provides an alternative to --include and allows a user to enter a comma separated list, or optionally "*" for "all data", of files to restore from the --archive. This is useful when only a few files need to be restored from an archive and can easily be entered via the command line.
  • --include indicates the relative path and filename (e.g. ./dir/to/file/filename) that contains the specified data to restore. It should have one entry per line and should be relative to the --source value. For flexibility, the user may use wildcards and other allowed syntax via tar's --files-from parameters.
  • --exclude same as the --include parameter, but for data that needs to be excluded during the restore process.
  • --overwrite specifies which existing files should be overwritten during the restore process.
  • --params allows administrators that require additional tar options the ability to pass them directly to tar with this parameter. NOTE: invalid or incorrect values here can break the operation of this software - use at your own risk!


Sync OPTION's

  • --port defines the port to communicate over when working with a remote node.
  • --source is the directory or network share that needs to be duplicated. Unless you're performing a sync only job, or you require an alternative source directory for some reason, this value will inherit the value of the backup modules --source parameter.
  • --target identifies the rsync daemon, host, or local directory needing to be updated. Like the --source parameter, if this value isn't specified, the value of the backup modules --target parameter is assumed.

NOTE: currently rsync daemons aren't supported, but will in future versions.

  • --dir specifies the parent directory in the --target that requires sync'ing. This acts similar to the backup ACTION's --targetDir parameter.
  • --tunnelUser provides the username to establish an SSH tunnel with the remote node. If a set of preshared keys have been exchanged, then simply do not use this parameter or the following one.
  • --tunnelPass provides the usernames corresponding password.
  • --params allows administrators that require additional rysnc options the ability to pass them directly to rsync with this parameter. NOTE: invalid or incorrect values here can break the operation of this software - use at your own risk!



Examples

Backing up data only (no sync'ing)...

$ sudo ./backup.lite --noprompts --name=test backup --type=full --source='/tmp/temp' --target='/tmp/backup' --compression=gzip --include='/etc/backup/test.inc'

Beginning the "test" backup job @ Tue Mar 27 10:37:44 EDT 2012

Checking system environment...

  (i)   Directories...
           Configs: [checking] [exists] [writable] [success] [done]
           Temp: [checking] [exists] [writable] [success] [done]
           Mounts: [checking] [exists] [writable] [success] [done]
  (i)   Variables...
           --name: [done]
           ACTION: [done]

Beginning the 'backup' module...

  (i)   Processing the source and target...
           Source: [symlinking] [success] [done]
           Target: [local] [checking] [exists] [writable] [success] [symlinking] [success] [done]
           Storage: [checking] [exists] [done]
  (i)   Checking variables: [type] [include] [done]
  (i)   Processing a(n) "full" backup  -----------------------------[PROGRESS]--

./
./original/
./original/flash.img
./a/
./a/b/
./a/b/test.txt
./a/b/test.sh
./flash.tar.gz
Total bytes written: 656384000 (626MiB, 31MiB/s)

--------------------------------------------------------------------------------
  (i)   Creating a catalog of backed up data: [done]
  (i)   Cycling the backups...
           Archive: [deleting] [success] [done]
           Catalog: [absent] [done]
           Job Log: [absent] [done]
  (i)   Check archive count: [within limits] [done]
  (i)   Compressing the archive: [gzip]
--------------------------------------------------------------------[PROGRESS]--
 626MB 0:01:05 [9.56MB/s] [==================================>] 100%            
--------------------------------------------------------------------------------
           [deleting] [success] [done]

Calling exit routines for the modules...

  (i)   backup.lite script...
           Source: [checking] [unmounted] [deleting] [success] [done]
           Target: [checking] [unmounted] [deleting] [success] [done]
           Cleanup: [deleting] [success] [done]

The job has completed successfully @ Tue Mar 27 10:39:16 EDT 2012



Using the Web Interface

This aspect of the project has not been developed yet, but it is planned. Please visit us again soon to see if this part has been implemented.



Developers

Dave Henderson [dhenderson (at) cliquesoft (dot) org]