Projects:Backup Tool/Functional Specification
Contents |
Introduction
This is the functional specification of a tool provided and maintained by Openbravo to backup the data contained in the Openbravo application.
This tool creates backups only of the Openbravo related entities (data, files), so this tool doesn’t replace a tool that backups the entire system.
Openbravo already has a backup tool in the professional appliances and cloud appliances, but in the other professional solutions like Ubuntu package or a custom install, it’s missing a backup tool. This new backup tool is intended for the cases where the Openbravo management console and its backups are not available.
The tool is intended for the use of system admin users, since they are the ones that can do system wide changes in the application, like create, customize, install modules and so on.
User stories
Katherine story
Katherine has a running Openbravo installation, and she wants to use backup functionally. So she activates the instance (acquire Professional Edition). A new window is now available for her - “General setup || Application || Backups“. She configures functionality and from now on each time Katherine installs a new module from the Module Management console, the application does an automatic backup. This backup can be automatically restored in case the application failed to install the module and also can be restored manually by Katherine if she wants to revert to the state before the module installation.
Alex story
Alex has a Openbravo running in the Amazon EC2 cloud, and wants to schedule automated backups to be stored in Amazon S3. Alex activates the OB instance, then configures the backup file system to S3 and selects a bucket to store it, then he schedules to do an automated backup every night at 3 am.
One day the Amazon instance is degraded, and it’s no longer accessible. Alex will start then another EC2 instance with Openbravo (clean), in the Backup window configure the same S3 backup directory that he was using previously and select the last automated backup and restore it. Alex will recover easily the application as it was from the last backup.
In addition to this backup, as good EC2 user, Alex was using reserved IP, so the new instance will have the same IP than the old, so there is no need to change DNS and the users might not even mention the problem.
Functional specifications
What is backed up?
The data of the application that is backed up consists of:
- The data of the database schema
- The sources directory
- The deployed directory in the Apache-Tomcat application server
What is not backed up?
The stack of Openbravo and their configuration are not stored in the backup, also the rest of the operating system is ignored by the backup tool.
The stack of Openbravo consist on:
- Database: Oracle or PostgreSQL
- Java application server: Apache-Tomcat
- Web server: Apache or others.
- Java Compiler: Open-jdk or Sun-jdk
The backup
The backup does not imply any server downtime.
The process:
- The database is exported in a dump
- The directories of sources and the Apache-Tomcat deploy are copied.
- The dump and the two directories are stored into a compressed file.
The restore
The restore process implies a server downtime.
The process:
- The database will be deleted and imported from the backup.
- The sources and deploy directories will be deleted and recreate from the backup.
- After all the data was restored the Apache-Tomcat will be restarted.
Types of backups
Three types of backups:
- Manual. The user can do a backup simply pressing the backup button.
- Automated: Openbravo will do automated backups before install any module.
- Scheduled: The user can scheduled backups to execute periodically.
Cases that cover the backup tool
The backups and restores can be performed although Openbravo application was down.
The backup cover all the data in database, sources dir and deploy dir, so these are the cases in which the backup tool will work:
- Openbravo is up and running
- Openbravo compilation problem
- Openbravo database data corrupted, context deleted, etc
- Openbravo not deployed to Apache/Tomcat
The backup not cover all the stack installation and configuration, so these are the cases in which it’s needed to restore/reinstall the stack before use the restore of the backup tool:
- Openbravo stack configuration lost
- Openbravo stack uninstallation
Command Line Interface
The tool can be used from:
- Openbravo application: User friendly, but the restore implies to setup have openbravo running in some case means to make a clean install of Openbravo and then restore the database.
- Command line: System admin friendly, not needed to have Openbravo running but it need the Openbravo stack configured and running.
Security
The tool will not have an user authentication, since it is accessed from Openbravo application and from the command line. So only users of Openbravo application with role System Admin can use it and users who have command line access to the host.
Iterations
- Basic functionality: Only local backups or any mounted device in the system that was accessible like a local disk.
- Schedule functionality.
- Command line interface (CLI)
- Backups in many file systems: add support of SMB, NFS, EBS, S3, etc
- Improve usability: backups (size and date information), file system (show remaining space in the selected device), filter (add a filter of backups by year, by year and month and by year, month and day)
- Automated backups: for example before install a module.
- Download and upload in a easy way the backups from the Openbravo interface.
- Improve the backups of database using redo-logs functionality of Oracle, check for similar functionality on PostgreSQL.
Priority of functionalities
Functionality | Priority |
---|---|
Basic | Must |
Scheduling | Must |
Command Line Interface | Must |
Other file systems | Nice to have |
Improve usability | Nice to have |
Automated backups | Nice to have |
Easy download/upload of backups | Nice to have |
Redo-logs of database | Nice to have |