profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/vejnar/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Charles Vejnar vejnar Yale University New Haven, CT, USA

vejnar/fontools 3

JSON-based FON (Feature Object Notation) format and tools to simplify genomic annotations usage

vejnar/bowtie2 0

A fast and sensitive gapped read aligner

vejnar/ChromosomeMappings 0

This repository contains chromosome/contig name mappings between UCSC <-> Ensembl <-> Gencode for a variety of genomes.

vejnar/deque 0

Fast ring-buffer deque (double-ended queue)

vejnar/failing-disk-reporter 0

Failing Disk Reporter (FDR): Get a report when a drive (HDD or SDD) is failing via Matrix or Slack

vejnar/hts 0

biogo high throughput sequencing repository

vejnar/labxdb 0

This is a mirror for LabxDB. Issues and PRs on GitLab.

vejnar/labxdb-python 0

This is a mirror for LabxDB Python. Issues and PRs on GitLab.

vejnar/lego 0

Let's Encrypt client and ACME library written in Go

vejnar/minimap2 0

A versatile pairwise aligner for genomic and spliced nucleotide sequences

started3coma3/btrfs-backup

started time in 8 days

release vejnar/failing-disk-reporter

v0.4

released time in 17 days

create barnchvejnar/failing-disk-reporter

branch : master

created branch time in 17 days

created repositoryvejnar/failing-disk-reporter

created time in 17 days

issue comment3coma3/btrfs-backup

[bug] Week retention not working

Hi @3coma3. Thanks for fixing this so fast! Problem I was having is solved.

My review for the patch:

  • I understand keeping 1 and 7 for compatibility but I wouldn't add so many more names (s, sun etc) for the config. I think sunday and monday are enough.
  • Add a comment to indicate this section of code checks the week number.
vejnar

comment created time in 20 days

issue opened3coma3/btrfs-backup

[potential bug] Week retention not working

Thanks for writing and maintaining this. I am testing it with success so far, before using it in production. But I have a problem with retention as it seems not to behave as I would except, if I understand the help correctly. In particular, the "week" retention.

For example, these snapshots are tagged/not-tagged using 4 leafs, 3 days, 4 weeks, 12 months and 5 years:

2021/06/26/152400 not tagged
2021/06/26/142400 not tagged
2021/06/24/152400 not tagged
2021/06/24/142400 not tagged
2021/06/23/152400 not tagged
2021/06/22/152400 tagged
2021/06/21/152400 tagged
2021/06/21/142400 tagged
2021/06/20/152400 tagged
2021/06/20/142400 tagged
2021/06/19/152400 tagged
2021/06/19/142400 tagged
2021/06/14/152400 tagged
2021/06/13/152400 tagged
2021/06/12/152400 tagged

I would except (13 and 20 are Sunday):

2021/06/26/152400 not tagged
2021/06/26/142400 not tagged
2021/06/24/152400 not tagged
2021/06/24/142400 not tagged
2021/06/23/152400 not tagged
2021/06/22/152400 tagged
2021/06/21/152400 tagged
2021/06/21/142400 tagged
2021/06/20/152400 not tagged
2021/06/20/142400 tagged
2021/06/19/152400 tagged
2021/06/19/142400 tagged
2021/06/14/152400 tagged
2021/06/13/152400 not tagged
2021/06/12/152400 tagged

To obtain this result, I replaced:

[[ -n "$lw" ]] && (( $(date -d "$lw UTC" +%s) - $(date -d "$y/$m/$d UTC" +%s) / (60 * 60 * 24) > 6 )) \
&& (( tag &= retention[weeks]-- < 1 ))
lw=$(date -d "$y/$m/$d -$(date -d $y/$m/$d +%u) days +$weekstart day" +'%F')

by

lw=$(date -d "$y/$m/$d" +'%Y%V')
(( $cw != $lw && (cw = lw, tag &= retention[weeks]-- < 1) ))
  • I replace your calculation with a variable keeping the current week (cw) and using date to get the current week number
  • Replacing +'%Y%V' by +'%Y%U' would use Sunday as first day of the week instead of Monday
  • I defined cw='000000' before the loop

To test my code, I added this code at the end of the backup script:

echo """/2021/06/26/152400
/2021/06/26/142400
/2021/06/24/152400
/2021/06/24/142400
/2021/06/23/152400
/2021/06/22/152400
/2021/06/21/152400
/2021/06/21/142400
/2021/06/20/152400
/2021/06/20/142400
/2021/06/19/152400
/2021/06/19/142400
/2021/06/14/152400
/2021/06/13/152400
/2021/06/12/152400""" | sort -dr | tokenize_path | check_retention --all | rotate_test

Does this make sense to you (if yes I can submit a PR)? Am I missing something?

created time in 21 days

push eventvejnar/fontools

vejnar

commit sha 64ee4ed5fda1a07514fda65a1db75f72eb3fac1c

Sort species list

view details

push time in a month

PublicEvent

pull request commentrestic/restic

Dynamically increase pack size with repository size

In my opinion, this is a great idea: number of files for large repositories is really a problem in my case and that solution wouldn't require any config from users. However, I would really like having smallestPackSize exposed as an option, similarly to what #2750 is proposing.

aawsome

comment created time in 3 months