Alfresco BART usage:
[bash]
./alfresco-bart.sh [set] [date dest]
[/bash]
But what really modes are? With modes I mean different ways to use Alfresco BART depending of what do you want to do, for instance:
- backup: runs an incremental backup or a full if first time
- restore: runs the restore, wizard if no arguments, see below more commands with arguments [set] [date] [dest], while [set] can also be “all” for all sets.
- verify: verifies the backup, it compares what you have backed up and what you have in your live system.
- collection: shows all the backup sets already in the backup archive that might be restored.
- list: lists the files currently backed up in the archive. It shows files contained in the last backup.
Sets:
- no value: use all backup sets
- index: use index backup set (group) for selected mode.
- db: use data base backup set (group) for selected mode.
- cs: use content store backup set (group) for selected mode.
- files: use rest of files backup set (group) for selected mode.
Now lets see how to use Alfresco BART.
To make a backup:
[bash]
./alfresco-bart.sh backup
[/bash]
NOTE1: if first time, it makes a full backup
NOTE2: you should add this command to your root crontab with something like “0 5 * * * /path/to/alfresco-bart.sh backup” (without quotes) if you want to run your backup daily at 5AM (after Alfresco’s nightly backups and maintenance jobs).
NOTE3: running command above with without any data sets (index, db, cs or files) it will perform a backup of all data sets configured in alfresco-bart.properties. You can run “./alfresco-bart.sh backup files” to only perform a backup of your configuration files, installation and customization files or “./alfresco-bart.sh backup cs” to create a backup (full if first time or incremental if not) of your contentstore and additional stores configured.
Commands and options to restore backup:
To restore an existing backup guided by the wizard:
[bash]
./alfresco-bart.sh restore
################## Welcome to Alfresco BART Recovery wizard ###################
This backup and recovery tool does not overrides nor modify your existing
data, then you must have a destination folder ready to do the entire
or partial restore process.
##############################################################################
Choose a restore option:
1) Full restore
2) Set restore
3) Restore a single file of your Alfresco repository
4) Restore alfresco-global.properties from a given date
5) Restore other configuration file or directory
Enter an option [1|2|3|4|5] or CTRL+c to exit:
[/bash]
To restore the last (now) existing backup of all sets (all) and leave it in /tmp:
[bash]
./alfresco-bart.sh restore all now /tmp
[/bash]
To restore a DB backup from 14 days ago to /tmp:
[bash]
./alfresco-bart.sh restore db 14D /tmp
[/bash]
To restore the indexes backup from december 2nd 2013:
[bash]
./alfresco-bart.sh restore index 12-02-2013 /tmp
[/bash]
Valid date format is: now: for last backup, s: for second, m: minutes, h: hours, D: days, W: weeks, M: months or Y: years, all date values must be specified without spaces, i.e: 4D, 2W, 1Y, 33m. Dates may also be like: YYYY/MM/DD, YYYY-MM-DD, MM/DD/YYYY or MM-DD-YYYY.
To restore a single file deleted on the repository but existing in previous backup please use the backup wizard by typing: “./alfresco-bart.sh restore” and then follow instructions in the menu option “3”.
To restore the alfresco-global.properties configuration file from a given date please use the backup wizard by typing: “./alfresco-bart.sh restore” and then follow instructions in the menu option “4”.
Finally if you want to restore any other configuration, installation or custom file from your existing backup on a given date follow instructions by choosing option 5 in the recovery wizard.
NOTE4: Alfresco BART restore options or recovery wizard never will overrides your existing Alfresco files, you should specify a temporary recovery folder with enough space, then you have to move that content manually or following the instructions on the screen.
In case of source mismatch error with Duplicity try running this command:
./alfresco-bart.sh backup all force
[/bash]