Difference between revisions of "backup.lite"

From Cliquesoft
Jump to: navigation, search
Line 20: Line 20:
 
====Backup OPTION's====
 
====Backup OPTION's====
  
* <b>--source</b>
+
* <b>--source</b> this is what happens
  
 
* <b>--target</b>
 
* <b>--target</b>

Revision as of 12:11, 8 July 2012

This project allows a user to backup and/or sync their data between multiple locations including local directories, network shares, and remote nodes using SSH with optional email contact upon success and/or failure of job. 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.


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.



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 this is what happens
  • --target
  • --count
  • --compress
  • --include
  • --type
  • --verify
  • --params


Sync OPTION's

  • --port
  • --source
  • --target
  • --dir
  • --tunnelUser
  • --tunnelPass
  • --params


Restore OPTION's

  • --source
  • --target
  • --archive
  • --archives
  • --collapse
  • --data
  • --include
  • --overwrite
  • --params



Examples

Installation is a simple 2-step process...

$ cd /path/to/uncompressed/package
$ ./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



Using the Web Interface

NOTE: this section applies for local and remote graphical user interfaces.

This section will discuss the options available to the user when interacting with various modules within the graphical interface, but before we get started, we'll need to explain how to make it available in the first place. Before you get discouraged, this process is nowhere near as complex as it may sound and can be accomplished with only one command, thanks to the clAPI framework! We'll now need to setup and/or start a web server that will enable the use of the GUI. If either of the following conditions are met, you can skip to the final paragraph of this section:

  • If you're using a "XiniX Compatible" device
  • If you installed this software using some type of graphical installer


  • Typical Users The easiest way to accomplish this goal is by starting clAPI's built-in web server using a single command entered at the prompt within a terminal window:

Type the following:

$ clapi --noprompts --verbose paged

To produce the following:

Checking system environment...

  (i)   Directories...
           Conf: [checking] [exists] [writable] [success] [done]
           Logs: [checking] [exists] [writable] [success] [done]
           Temp: [checking] [exists] [writable] [success] [done]
  (i)   User Interface: [console] [done]

Beginning the 'paged' module...

  (i)   Initializing the web server on 127.0.0.1 over 8080: [serving]
--------------------------------------------------------------------[PROGRESS]--
Sat Jul  7 20:15:06 UTC 2012    INFO    Changing into the serving directory
Sat Jul  7 20:15:06 UTC 2012    INFO    Creating environment...
Sat Jul  7 20:15:06 UTC 2012    INFO    Starting UI dependencies...
Sat Jul  7 20:15:06 UTC 2012    INFO    Starting web server...
  • Administrators For the admins that already have a web server installed such as paged, Apache, IIS, nginx, lighttpd, boa, or any other, you can simply point it to the directory that the 'GUI files' were installed to during the clAPI and backup.lite installation. Afterwards, restart your web server and you're good to go!


If you've made it this far, then you now have access the graphical interface of the software using any web browser. For users working with this software on a local device (e.g. personal computer, tablet, smart phone, etc), simply navigate to "http://127.0.0.1:8080", alternatively "http://localhost:8080", and after providing the authentication credentials for a valid system user account, you can interact with all of the installed modules. Users accessing this on a remote device (e.g. Backup server, NAS, etc) will need to use "http://x.x.x.x:8080" where "x.x.x.x" represents the IP address of the device. If this doesn't work for you, contact your network administrator or technical support company.


Backup Module

Overview Tab

  • Archive Issues (button) This button will archive all the information that's presented in the "Issues that need Attention" section of the screen. This can be useful if that information will ever be required in the future.
  • Scheduled Jobs As the name suggests, this box shows all the upcoming scheduled tasks along with their scheduled job number and planned execution time. There are no interactions possible in this area as all the content presented here is information only.
  • Completed Jobs This area lists all of corresponding logs of each backup job that has completed succesfully. [NOTE: Please be aware that since these logs correspond to the currently stored backup archives, as they rotate, so do the logs!] This box does present the ability for the user to view any of those logs by simply clicking the log ID and then clicking the "Log" tab.
  • Issues that need Attention In order to minimize the work needed to resolve encountered problems, this section was provided to show you the recorded errors along with one-click access to the logs (see above) for details.


Jobs Tab

  • New (button)
  • Rename (button)
  • Copy (button)
  • Delete (button)
  • Save (button)
  • Saved job
  • Type & Compression
  • Start date & time
  • Frequency
  • Data storage
  • Miscellaneous
  • Contact name
  • Email address
  • Job status
  • Source backup path
  • Connect as...
  • Target storage path
  • Connect as...
  • Category/ID
  • Sync URI & Port
  • Remote directory
  • Connect as...


Data Tab

  • Save (button) Once you've got the "Include data" and "Exclude data" lists filled out according to the backup job, click this button to save them to disk.
  • Directory listing (left-hand pane) This listing corresponds to the files and folders stored under the "Source backup path" from the "Jobs" tab. You can use this directory listing to add items to the "Included data" and "Excluded data" boxes by simply locating the desired file or folder and dragging it to intended listbox.

NOTE: currently this doesn't work if the "Source backup path" is a network share - we're working on correcting this in future versions.

  • Included data By default this screen will have a value of "All data" indicating that all data shown in the "Directory Listing" will be backed up. You can, of course, remove this or any other entries by highlighting it in the list and clicking the associated "-" button. For flexibility, the ability to add manual entries, possibly containing optional wildcards, can be entered using the corresponding textbox and clicking the "+" button.
  • Excluded data This box contains the same functionality as the "Included data" section, but instead, refers to files or folders that should not be included in the backup. This can work even if the "Included data" box contains "All data".


Log Tab

  • Archive (button) This button will allow the user to archive the currently loaded log for manual deletion of their own accord.

NOTE: if you want to load a log in this screen, see the "Overview" tab options above.


Status Tab

  • Clear Completed (button) Any backup jobs that are started from within this software using the "Run now" button on the "Jobs" tab will show their progress on this screen. Clicking this button will clear all of the completed jobs from the listing.


About Tab

This screen shows information related to the software that would be useful for troubleshooting any experienced problems. There's also several links on this page to hear from our users and community as well as finding help for the software itself.


Restore Module

Overview Tab

  • Archive Issues (button) This button will archive all the information that's presented in the "Issues that need Attention" section of the screen. This can be useful if that information will ever be required in the future.
  • Completed Jobs This area lists all of corresponding logs of each restore job that has completed succesfully. This box does present the ability for the user to view any of those logs by simply clicking the log ID and then clicking the "Log" tab.
  • Issues that need Attention In order to minimize the work needed to resolve encountered problems, this section was provided to show you the recorded errors along with one-click access to the logs (see above) for details.


Jobs Tab

  • Restore (button)
  • Saved jobs
  • Restore options
  • Miscellaneous
  • Associated archives
  • Source storage path
  • Connect as...
  • Target restore path
  • Connect as...
  • Category/ID
  • Sync URI & Port
  • Remote directory
  • Connect as...
  • Tar parameters
  • Rsync parameters
  • Notes on the job


Data Tab

  • Restore (button) This button performs the same tasks as the one on the "Jobs" tab.
  • Directory listing (left-hand pane) This listing corresponds to the files and folders stored under the "Source storage path" from the "Jobs" tab. You can use this directory listing to add items to the "Included data" and "Excluded data" boxes by simply locating the desired file or folder and dragging it to intended listbox.

NOTE: currently this doesn't work if the "Source backup path" is a network share - we're working on correcting this in future versions.

  • Included data By default this screen will have a value of "All data" indicating that all data shown in the "Directory Listing" will be backed up. You can, of course, remove this or any other entries by highlighting it in the list and clicking the associated "-" button. For flexibility, the ability to add manual entries, possibly containing optional wildcards, can be entered using the corresponding textbox and clicking the "+" button.
  • Excluded data This box contains the same functionality as the "Included data" section, but instead, refers to files or folders that should not be included in the backup. This can work even if the "Included data" box contains "All data".


Log Tab

  • Archive (button) This button will allow the user to archive the currently loaded log for manual deletion of their own accord.

NOTE: if you want to load a log in this screen, see the "Overview" tab options above.


Status Tab

  • Clear Completed (button) Any backup jobs that are started from within this software using the "Run now" button on the "Jobs" tab will show their progress on this screen. Clicking this button will clear all of the completed jobs from the listing.


About Tab

This screen shows information related to the software that would be useful for troubleshooting any experienced problems. There's also several links on this page to hear from our users and community as well as finding help for the software itself.



Developers

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