software

From Cliquesoft
Revision as of 06:08, 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
$ cd /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 /path/to/uncompressed/package
$ ./install



Using the CLI

ACTION's

Among our standard 'help', 'version', and 'update' command line ACTIONs, this project also contains several others that are available - 'backup', 'sync', and 'restore'. It's probably pretty obvious what task each of those handles, so we'll go ahead and move into the OPTIONs section below...


Job Wizard

This OPTION belongs to the parent script of the project since parameters must accompany their respective "module" in order to be processed correctly. Useful for initially creating backup jobs, this parameter initiates a wizard that will walk you through all of the necessary steps. Starting this process is as simple as executing "backup.lite wizard" at the command line.


Backup OPTION's

  • --source specifies the path or network share that needs to be backed up. Currently this parameter can accept a local directory or networked path as its value. Please note that network paths indicate the network type, for instance '\\192.168.0.10\Share' indicates a Microsoft Windows share (SMB/CIFS) whereas '//192.168.0.11/Share' indicates a Linux share (NFS). When using this parameter, be sure to surround it using single quotes!
  • --target can be accept the same values as the --source parameter, but represents the target location where the backup archives should be stored.
  • --targetDir is a directory that is appended to the --target value so that separation or combination of the backup archives generated and maintained by the software can be determined by the backup administrator. For example, lets say that you are backing up two servers called "ServerA" and "ServerB" with each server having incremental backup jobs Monday through Thursday and a full backup on Friday. It might be desired to have all the archives of each backup job relating to the separate severs being grouped in the same directory. So for each backup job relating to each server, you could simply specify the same --target (e.g. /var/backups) and --targetDir values (e.g. ServerA) to have the archives grouped together (e.g. /var/backups/ServerA).
  • --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.
  • --compression specifies the type of compression to apply on the backup archive.
  • --count regulates how many backup archives of the configured --type (e.g. daily, incremental, full, etc) are maintained in the --targetDir directory. As an example, if you have only one full backup job being stored in a unique --targetDir and set this value to "4", then only 4 full backup archives will be maintained.
  • --include indicates the relative path and filename (e.g. ./dir/to/file/filename) that contains the specified data to backup. 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 backup process.
  • --type specifies which type of backup should occur during the backup job. Each type backs up a different set of data which can be found here. If "custom" is used as the value here, the user must specify all of the tar options, with the exception of "-c -f -v --totals", as the value of the --params parameter below.
  • --verify will verify the data integrity within the backup archive against the live data to help ensure errors in the backup process itself.
  • --params allows administrators that require additional tar options the ability to pass them directly to tar with this parameter. Also see the --type parameter above. NOTE: invalid or incorrect values here can break the operation of this software - use at your own risk!


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]