GitLab: Is the backup rake task atomic? -
if make gitlab backup using gitlab:backup:create rake task pushing repositories, backup process affected?
is necessary shutdown gitlab before doing backup?
the task gitlab/backup.rake
doesn't atomic.
calls:
rake::task["gitlab:backup:db:create"].invoke rake::task["gitlab:backup:repo:create"].invoke
puts "dumping database tables ... ".blue activerecord::base.connection.tables.each |tbl| ...
like other operations activerecord (see this question), doesn't seem global atomic operation.
hold on, few hours ago, randx (dmitriy zaporozhets), main developer gitlab, refactored dumping database:
- commit 38d23c0e5f816937047c9326f9dd33fb10490032 shows use of system call
mysqldump
:
system("mysqldump #{mysql_args} #{config['database']} > #{db_file_name}")
- commit c33d5e16fe5f5dde4f270adaf7fb6fe5b9552018 add
grant select, lock tables, ...
so part dumping database more atomic ;)
backup itself, involves other steps including backing bare repos, not atomic.
Comments
Post a Comment