<commit_before>
USING: namespaces io.files bootstrap.image builder.util ;

IN: update.backup

: backup-boot-image ( -- )
  my-boot-image-name
  { "boot." my-arch "-" [ "datestamp" get ] ".image" } to-string  
  move-file ;

: backup-image ( -- )
  "factor.image"
  { "factor" "-" [ "datestamp" get ] ".image" } to-string
  move-file ;

: backup-vm ( -- )
  "factor"
  { "factor" "-" [ "datestamp" get ] } to-string
  move-file ;

: backup ( -- )
  datestamp "datestamp" set
  backup-boot-image
  backup-image
  backup-vm ;<commit_msg>update.backup: run backup in a try<commit_after>
USING: namespaces debugger io.files bootstrap.image builder.util ;

IN: update.backup

: backup-boot-image ( -- )
  my-boot-image-name
  { "boot." my-arch "-" [ "datestamp" get ] ".image" } to-string  
  move-file ;

: backup-image ( -- )
  "factor.image"
  { "factor" "-" [ "datestamp" get ] ".image" } to-string
  move-file ;

: backup-vm ( -- )
  "factor"
  { "factor" "-" [ "datestamp" get ] } to-string
  move-file ;

: backup ( -- )
  datestamp "datestamp" set
    [
      backup-boot-image
      backup-image
      backup-vm
    ]
  try ;
{'fraction_non_alphanumeric': 0.17907801418439717, 'fraction_numerical': 0.0, 'mean_word_length': 2.5171339563862927, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5543355', 'n_tokens_mistral': 422, 'n_tokens_neox': 419, 'n_words': 85}