Alfresco BART

Project was moved to Github!

Please go to https://github.com/toniblyx/alfresco-backup-and-recovery-tool 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

 

CHANGELOG
[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: http://blyx.com/2013/08/07/alfresco-backup-and-recovery-tool-release-v0-1/

REQUIREMENTS

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 http://duplicity.nongnu.org.

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

INSTALLATION

  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 “alfresco-bart.sh”, it must be executable (“chmod +x alfresco-bart.sh”).
  4. Protect permissions for alfresco-bart.properties, 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 alfresco-bart.properties”.
  5. Edit ALFBRT_PATH variable in “alfresco-bart.sh”, read, understand and configure all required options in “alfresco-bart.properties”.
  6. Run “./alfresco-bart.sh” to get usage help
  7. Add “0 5 * * * /path/to/alfresco-bart.sh 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 “alfresco-bart.sh backup” it will do a full backup then incremental backups as you configure in alfresco-bart.properties.

 

56 thoughts to “Alfresco BART”

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

    FULLDAYS=30D
    BACKUP_POLICIES_ENABLED=true
    CLEAN_TIME=12M
    MAXFULL=6

    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:

    ./alfresco-bart.sh: line 121: -v4: command not found
    ./alfresco-bart.sh: line 165: -v4: command not found
    ./alfresco-bart.sh: line 269: -v4: command not found
    ./alfresco-bart.sh: line 769: remove-older-than: command not found
    ./alfresco-bart.sh: line 771: remove-all-inc-of-but-n-full: command not found
    ./alfresco-bart.sh: line 788: remove-older-than: command not found
    ./alfresco-bart.sh: 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]# ./alfresco-bart.sh verify cs
    =========================== BACKUP VERIFICATION FOR CONTENTSTORE =============== ============
    Traceback (most recent call last):
    File “/usr/bin/duplicity”, line 1540, in
    with_tempdir(main)
    File “/usr/bin/duplicity”, line 1534, in with_tempdir
    fn()
    File “/usr/bin/duplicity”, line 1385, in main
    do_backup(action)
    File “/usr/bin/duplicity”, line 1464, in do_backup
    verify(col_stats)
    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/collections.py”, line 971, in get_backup_chain_at_time
    raise CollectionsError(“No backup chains found”)
    CollectionsError: No backup chains found

    Grazie
    NAT

  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.