Alfresco BART

Project was moved to Github!

Please go to for downloads, questions, issues, suggestions or feedback. Thanks!

READ THIS WHITE PAPER TO UNDERSTAND THE BACKUP PROCESS: Alfresco Backup and Disaster Recovery – White Paper.pdf


[Aug/6/13] v0.1
– first release

[Nov/5/13] v0.2
– fixed LOCAL_DB_DIR comment
– added PGPASSWORD on dump command for Postgresql
– added date and time to any DB dump
– added logging to db dumps
– added backup of full Solr directory except live indexes (like a default installation based on the installer)
– added command line option to backup task, now you can invoke directly backup set (index, db, cs or files), if nothing is specified a backup will be done as in the configuration file.
– improved command options for restoration
– added “–single-transaction” to the mysqldump command
– added single file recovery from the contentstore (only mysql installations supported)
– added single file or directory recovery from the installation files.
– added “–allow-source-mismatch” in a force option if source hostname changes

Full list of features:


For description and changelog see README file.

Alfresco BART needs Duplicity (Python backup tool). Install it or Alfresco BART won’t work. Most Linux distributions have readymade Duplicity packages available. If you encounter errors using the distro’s duplicity please double check if the version is outdated on

Please try using the latest stable Duplicity version (0.6.21) from the Duplicity website before filing bug reports. If you install Duplicity from the website’s tarball check next “Requirements” before:

  • Python v2.4 or later
  • librsync v0.9.6 or later
  • GnuPG for encryption
  • NcFTP version 3.1.9 or later
  • Boto 1.6a or later

Other Alfresco BART dependences are:

  • mysqldump for MySQL backup
  • pg_dump for PostgreSQL backup
  • imp for Oracle backup


  1. Create a GPG key for encryption support “gpg –gen-key” (double dash before gen), encryption is recommended.
  2. Copy the files “alfresco-bart.*” to the “scripts” directory inside your Alfresco installation directory or simply use it from anywhere in your file system (anyways I recommend to install it in your Alfresco installation).
  3. Check the executable permissions on “”, it must be executable (“chmod +x”).
  4. Protect permissions for, it must be set as read only for the user who runs the backup, i.e. to assign read permission only for the owner type “chmod 400”.
  5. Edit ALFBRT_PATH variable in “”, read, understand and configure all required options in “”.
  6. Run “./” to get usage help
  7. Add “0 5 * * * /path/to/ backup” to the appropriate crontab if you want to run your backup daily at 5AM (after Alfresco’s nightly backups and maintenance jobs). First time you run “ backup” it will do a full backup then incremental backups as you configure in


56 thoughts to “Alfresco BART”

  1. Toni,
    Mirando las retenciones por defecto tenemos lo siguiente:


    No sé si va relacionado, pero ¿Existe alguna posibidad de realizar full-backups diarios? ¿Se puede forzar de alguna forma?

  2. Ciao Tony
    ho provato a provare Alfresco BURT con i seguenti errori:

    ./ line 121: -v4: command not found
    ./ line 165: -v4: command not found
    ./ line 269: -v4: command not found
    ./ line 769: remove-older-than: command not found
    ./ line 771: remove-all-inc-of-but-n-full: command not found
    ./ line 788: remove-older-than: command not found
    ./ line 790: remove-all-inc-of-but-n-full: command not found

    Mi puoi aiutare
    Grazie Nat

  3. Scusa Toni ho il seguente errore:

    [root@c4h-as-test scripts]# ./ verify cs
    =========================== BACKUP VERIFICATION FOR CONTENTSTORE =============== ============
    Traceback (most recent call last):
    File “/usr/bin/duplicity”, line 1540, in
    File “/usr/bin/duplicity”, line 1534, in with_tempdir
    File “/usr/bin/duplicity”, line 1385, in main
    File “/usr/bin/duplicity”, line 1464, in do_backup
    File “/usr/bin/duplicity”, line 862, in verify
    collated = diffdir.collate2iters(restore_get_patched_rop_iter(col_stats),
    File “/usr/bin/duplicity”, line 750, in restore_get_patched_rop_iter
    backup_chain = col_stats.get_backup_chain_at_time(time)
    File “/usr/lib64/python2.7/site-packages/duplicity/”, line 971, in get_backup_chain_at_time
    raise CollectionsError(“No backup chains found”)
    CollectionsError: No backup chains found


  4. Toni muchas gracias por esta herramienta, tengo una duda respecto a la restauración en otra maquina, respecto a este punto que aparece en gidhub “HOW TO RESTORE YOUR BACKUP IN A DIFFERENT SEVER
    1- Install Alfresco BART as usual. 2- Copy the directory ~/.gnupg from de original server to the new one (if gpg encryption is used). 3- Run the recovery wizard as usual. 4- Enjoy restoring your disaster recovery environment.”

    A que se refiere con “Copy the directory ~/.gnupg”, estoy un poco perdido (Si estoy usando gpp encryption), lo otro la opción de restauración, no realiza una restauración de la base de datos entiendo?, este punto tendría que realizarse de forma manual?

    Quedo atento a tus comentarios y muchas gracias por tu colaboración!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.