AkeebaBackup module for NodeJS
This module lets you easily use the AkeebaBackup JSON APIs in node.js. AkeebaBackup (http://www.akeebabackup.com) is THE backup software for Joomla! As of version 0.1.0, it supports only the raw encryption, but in the future, if needed, the other encryption system supported by the apis will be added.
Installation
Using npm
:
npm install akeebabackup
You can also clone this repository into your node_modules
directory.
Examples
Trigger a Backup
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try yoursite; yoursite; catche console;
Available methods
Here you'll be able to see a list of methods available in the akeebabackup module, such as:
- backup
- stopBackup
- srp
- delete
- deleteFiles
- download
- downloadDirect
- getBackupInfo
- getLog
- getProfiles
- getVersion
- listBackups
- update
- updateGetInformations
backup
Trigger a new backup
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.backup(['profile_id']); yoursite; yoursite; yoursite; yoursite; catche console;
backup
Stops a running backup
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.backup(['profile_id']); yoursite; yoursite; yoursite; catche console;
srp
Trigger a System Restore Point backup for an extension
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.srp('name', 'type', ['group']); yoursite; yoursite; yoursite; yoursite; catche console;
delete
Completely removes a backup record from the database. Unlike deleteFiles, it will delete the files corresponding to the given backup record and the backup record itself. The Akeeba Backup component will not be aware that the specified backup record ever existed.
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.delete(id, callback) yoursite; catche console;
deleteFiles
Remove only the files corresponding to a given backup record, but not the backup record itself. The Akeeba Backup component will display this backup record marked as "obsolete"
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.deleteFiles(id, callback) yoursite; catche console;
download
Download (step by step) a backup file to a file
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.download(id, file) yoursite; yoursite; catche console;
downloadDirect
Download a file directly, without encryption and step by step download
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.downloadDirect(id, file) yoursite; yoursite; catche console;
getBackupInfo
Gets detailed information about a specific backup record.
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.getBackupInfo(id, callback) yoursite; catche console;
getLog
Downloads The log file for a specific backup tag
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.getLog(tag, file) yoursite; yoursite; catche console;
getProfiles
Returns a list of the backup profiles. The callback receives an array:
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.getProfiles(callback) yoursite; catche console;
getVersion
Returns the version number of the API and the component. The callback receives an object:
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.getVersion(callback) yoursite; catche console;
listBackups
Returns a (partial) list of the backup records known to the component. The records are presented in reverse order, i.e. the first record is the last backup attempt, whereas the last record is the earliest backup attempt known to the component.
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.listBackups(callback, start, limit) yoursite; catche console;
update
Triggers the entire akeeba update process
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try yoursite; yoursite; yoursite; catche console;
updateGetInformation
Returns update status information, as returned by Live Update itself
var akeeba = ;var yoursite = 'http://www.example.com' 'yoursecretkey'; try // yoursite.updateGetInformation(callback, force_fetch_new_data) yoursite; catche console;