Hello,
I am running gitlab-ce-10.1.0 and I am trying to figure out a way to print the time before starting the backup of repository. The main idea is to have a record of how long does it take to back up a repository.
Currently the output looks like this:
Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... [DONE]
done
Dumping repositories ...
* department/project1 ... [DONE]
* department/project1.wiki ... [SKIPPED]
List item
I want to have output like this:
Dumping database ... 02.12.2017 20:03:00 Dumping PostgreSQL database gitlabhq_production ... [DONE] 02.12.2017 20:03:10 done Dumping repositories ... 02.12.2017 20:03:11 * department/project1 ... [DONE] 02.12.2017 20:03:20 * department/project1.wiki ... [SKIPPED] 02.12.2017 20:03:11
I found the code in /opt/gitlab/embedded/service/gitlab-rails/lib/backup/repository.rb but I am not experienced in Ruby, so before googling “how to print local time in Ruby”, has anyone done this or similar change and can give me a hint how to do it?
Thanks in advance.