dedup

From Cliquesoft
Revision as of 07:41, 27 March 2012 by Digitalpipe (Talk | contribs)

Jump to: navigation, search

A simple utility script used for de-duplication of data pools such as your pictures or documents. There's no deletion of the original files, but instead all unique data is copied to a separate directory so the originals can be deleted, backed up, or some other desired task. Not unlike our other bash-script-based software, this project relies on our clAPI framework for various functionality, so be sure this dependency is satisfied before using. It's also worth mentioning 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.


Terms

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



ACTION's

Among our standard 'help', 'version', and 'update' ACTIONs, this project also contains two others - 'install' and 'show'. The 'install' ACTION simply installs the script in the "~/.bin" directory for XiniX and "/usr/bin" for typical GNU/Linux distros. To see how easy it is to install, see the examples section.

The other ACTION, 'show', will perform most of the desired work. It's important to note that the returned information will be different based on the value provided for the --target OPTION. For simplicity and ease-of-use, if --target contains just a server name, ip address, or FQDN (e.g. --target=servername.mydomain.local, --target="192.168.0.10", etc), the results will show all of the shares currently being offered by that server. However, if the --target value includes a share name and optional path (e.g. --target='\\servername\share', --target='\\192.168.0.10\share\dir\path'), lssmb will display the entire contents of that directory (which can further be refined by using the --match option). Notice that when providing a share and optional path in the examples, each value was enclosed by single quotes and the server was preceeded by double back-slashes as this is the common syntax for network interaction within a Microsoft Windows OS environment. If the network share value isn't enclosed by double back-slashes, an error will occur.


OPTION's

In order to help the local device communicate its' access credentials to the --target server, the script provides three additional OPTION's to specify these values which are --targetUser, --targetPass, and --targetDom. Each is case-sensative and provides the username, password, and optional domain/workgroup name respectively in order to perform authentication to the server.

The final two OPTION's deal with controlling what the output contains. The --details OPTION provides more information on the results and does NOT take any values. On the other hand, the --match OPTION allows you to specify a word or phrase as its value that will be used to return any matching file or directory names contained within the --target.



Examples

Installation is a simple 2-step process...

$ cd /path/to/uncompressed/package
$ ./dedup install

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



Developers

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