<commit_before>#!/bin/sh

###########################################################################
#                                                                         #
#  This shell script demonstrates a backup/restore recipe for live        #
#  Subversion repositories.  It is intended only as an example; the       #
#  idea is that you can read over this script, understand how it works    #
#  (it's extensively commented), and then implement real backup and       #
#  restore scripts based on this recipe.                                  #
#                                                                         #
#  To reiterate: this is *not* a backup and restore solution.  It's       #
#  just documentation, in the form of code with comments.                 #
#                                                                         #
#  If you do implement your own scripts based on the recipe here, and     #
#  your implementations are generic enough to be generally useful,        #
#  please post them to <EMAIL>.  It would be great if   #
#  we could offer a real solution, and not just a description of one.     #
#                                                                         #
#  This recipe is distilled from the Berkeley DB documentation, see       #
#  http://www.sleepycat.com/docs/ref/transapp/archival.html.              #
#                                                                         #
#  See also http://www.sleepycat.com/docs/ref/transapp/reclimit.html for  #
#  for possible problems using standard 'cp' in this recipe.              #
#                                                                         #
###########################################################################

# High-level overview of the hot backup recipe:
# 
#    1. Ask BDB's db_archive for a list of unused log files.
#
#    2. Copy the entire db/ dir to the backup area.
#
#    3. Recopy all the logfiles to the backup area.  There may be more
#       logfiles now than there were when step (1) ran.
#
#    4. Remove the logfiles listed as inactive in step (1) from the
#       repository, though not from the backup.
#    
# High-level overview of the restoration recipe:
#
#    1. Copy all the datafiles and logfiles back to the repository.
#
#    2. Run Berkeley's "catastrophic recovery" utility on the repository.
#
# That's it.  Here we go...<commit_msg>* contrib/server-side/backup-recipe.sh: Improve initial comment.<commit_after>#!/bin/sh

###########################################################################
#                                                                         #
#  This shell script demonstrates a backup/restore recipe for live        #
#  Subversion repositories.  It is intended only as an example; the       #
#  idea is that you can read over this script, understand how it works    #
#  (it's extensively commented), and then implement real backup and       #
#  restore scripts based on this recipe.                                  #
#                                                                         #
#  To reiterate: this is *not* a backup and restore solution.  It's       #
#  really just documentation, in the form of code with comments.          #
#                                                                         #
#  If you do implement your own scripts based on the recipe here, and     #
#  your implementations are generic enough to be generally useful,        #
#  please post them to <EMAIL>.  It would be great if   #
#  we could offer a real solution, and not just a description of one.     #
#                                                                         #
#  This recipe is distilled from the Berkeley DB documentation, see       #
#  http://www.sleepycat.com/docs/ref/transapp/archival.html.              #
#                                                                         #
#  See also http://www.sleepycat.com/docs/ref/transapp/reclimit.html for  #
#  for possible problems using standard 'cp' in this recipe.              #
#                                                                         #
###########################################################################

# High-level overview of the full backup recipe:
# 
#    1. Ask BDB's db_archive for a list of unused log files.
#
#    2. Copy the entire db/ dir to the backup area.
#
#    3. Recopy all the logfiles to the backup area.  There may be more
#       logfiles now than there were when step (1) ran.
#
#    4. Remove the logfiles listed as inactive in step (1) from the
#       repository, though not from the backup.
#    
# High-level overview of the incremental backup recipe:
#
#    1. Just copy the Berkeley logfiles to a backup area.
#    
# High-level overview of the restoration recipe:
#
#    1. Copy all the datafiles and logfiles back to the repository, in
#       the same order they were backed up.
#
#    2. Run Berkeley's "catastrophic recovery" command on the repository.
#
# That's it.  Here we go...
{'fraction_non_alphanumeric': 0.12170465807730427, 'fraction_numerical': 0.0033696729435084244, 'mean_word_length': 1.552352048558422, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 36, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2960013', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1104, 'n_words': 501}