Giter VIP home page Giter VIP logo

Comments (9)

kkimurak avatar kkimurak commented on June 11, 2024

Scheduled backup is a crontab task for the user git. You are setting GITLAB_BACKUP_DIR to /backup/ and it means the backup will be about to created in /backup/ (top level directory of filesystem) that causes permission error.
Just set GITLAB_BACKUP_DIR to the directory where the user git have write permission, or just remove it to use default value $GITLAB_DATA_DIR/backup (will be expanded to /home/git/data/backup).

from docker-gitlab.

linux-golang avatar linux-golang commented on June 11, 2024

I have added 777 permissions here, but it still doesn't seem to work. Let me remove GITLAB_BACKUP_DIR and give it a try.

from docker-gitlab.

linux-golang avatar linux-golang commented on June 11, 2024

But it seems that the backup is still not triggered. How can I check the log?

from docker-gitlab.

kkimurak avatar kkimurak commented on June 11, 2024

The filename for backup is /var/log/gitlab/gitlab/backup_json.log.

Logs are stored in $GITLAB_LOG_DIR (/var/log/gitlab/gitlab. /home/git/gitlab/log is symlink for the directory. In /var/log/gitlab/, there are logs for other middleware like gitaly, gitlab-shell, nginx and supervisor.

Also, you may want to refer #2790 . If your problem is related to this ticket and I was mistaken, you should be able to use the original GITLAB_BACKUP_DIR configuration as they are chowned automatically.

from docker-gitlab.

linux-golang avatar linux-golang commented on June 11, 2024

Logfile created on 2024-02-18 19:00:24 +0800 by logger.rb/v1.5.0

{"severity":"INFO","time":"2024-02-18T11:00:24.692Z","correlation_id":null,"message":"Dumping database ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.299Z","correlation_id":null,"message":"Dumping database ... done"}
{"severity":"INFO","time":"2024-02-18T11:00:29.299Z","correlation_id":null,"message":"Dumping repositories ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.730Z","correlation_id":null,"message":"Dumping repositories ... done"}
{"severity":"INFO","time":"2024-02-18T11:00:29.730Z","correlation_id":null,"message":"Dumping uploads ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.739Z","correlation_id":null,"message":"Dumping uploads ... done"}
{"severity":"INFO","time":"2024-02-18T11:00:29.739Z","correlation_id":null,"message":"Dumping builds ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.742Z","correlation_id":null,"message":"Dumping builds ... done"}
{"severity":"INFO","time":"2024-02-18T11:00:29.742Z","correlation_id":null,"message":"Dumping artifacts ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.751Z","correlation_id":null,"message":"Dumping artifacts ... done"}
{"severity":"INFO","time":"2024-02-18T11:00:29.751Z","correlation_id":null,"message":"Dumping pages ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.754Z","correlation_id":null,"message":"Dumping pages ... done"}
{"severity":"INFO","time":"2024-02-18T11:00:29.754Z","correlation_id":null,"message":"Dumping lfs objects ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.756Z","correlation_id":null,"message":"Dumping lfs objects ... done"}
{"severity":"INFO","time":"2024-02-18T11:00:29.756Z","correlation_id":null,"message":"Dumping terraform states ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.766Z","correlation_id":null,"message":"Dumping terraform states ... done"}
{"severity":"INFO","time":"2024-02-18T11:00:29.766Z","correlation_id":null,"message":"Dumping container registry images ... [DISABLED]"}
{"severity":"INFO","time":"2024-02-18T11:00:29.766Z","correlation_id":null,"message":"Dumping packages ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.769Z","correlation_id":null,"message":"Dumping packages ... done"}
{"severity":"INFO","time":"2024-02-18T11:00:29.769Z","correlation_id":null,"message":"Dumping ci secure files ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.769Z","correlation_id":null,"message":"Deleting tar staging files ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.770Z","correlation_id":null,"message":"Cleaning up /home/git/data/backups/db"}
{"severity":"INFO","time":"2024-02-18T11:00:29.770Z","correlation_id":null,"message":"Cleaning up /home/git/data/backups/repositories"}
{"severity":"INFO","time":"2024-02-18T11:00:29.772Z","correlation_id":null,"message":"Cleaning up /home/git/data/backups/uploads.tar.gz"}
{"severity":"INFO","time":"2024-02-18T11:00:29.772Z","correlation_id":null,"message":"Cleaning up /home/git/data/backups/builds.tar.gz"}
{"severity":"INFO","time":"2024-02-18T11:00:29.773Z","correlation_id":null,"message":"Cleaning up /home/git/data/backups/artifacts.tar.gz"}
{"severity":"INFO","time":"2024-02-18T11:00:29.773Z","correlation_id":null,"message":"Cleaning up /home/git/data/backups/pages.tar.gz"}
{"severity":"INFO","time":"2024-02-18T11:00:29.773Z","correlation_id":null,"message":"Cleaning up /home/git/data/backups/lfs.tar.gz"}
{"severity":"INFO","time":"2024-02-18T11:00:29.773Z","correlation_id":null,"message":"Cleaning up /home/git/data/backups/terraform_state.tar.gz"}
{"severity":"INFO","time":"2024-02-18T11:00:29.774Z","correlation_id":null,"message":"Cleaning up /home/git/data/backups/packages.tar.gz"}
{"severity":"INFO","time":"2024-02-18T11:00:29.774Z","correlation_id":null,"message":"Deleting tar staging files ... done"}
{"severity":"INFO","time":"2024-02-18T11:00:29.774Z","correlation_id":null,"message":"Deleting backups/tmp ... "}
{"severity":"INFO","time":"2024-02-18T11:00:29.774Z","correlation_id":null,"message":"Deleting backups/tmp ... done"}

from docker-gitlab.

kkimurak avatar kkimurak commented on June 11, 2024

Hmm, it seems that backup operation is triggered correctly but aborted after the line Dumping ci_secure_files. Could you check crontab log /var/log/gitlab/gitlba/gitlab-backup.log ? It contains exact log of rake task gitlab:backup:create.

from docker-gitlab.

linux-golang avatar linux-golang commented on June 11, 2024

2024-02-18 19:00:24 +0800 -- Dumping database ...
Dumping PostgreSQL database gitlab_production ... [DONE]
2024-02-18 19:00:29 +0800 -- Dumping database ... done
2024-02-18 19:00:29 +0800 -- Dumping repositories ...
{"command":"create","gl_project_path":"root/ci-test","level":"info","msg":"started create","pid":1881,"relative_path":"@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.git","storage_name":"default","time":"2024-02-18T11:00:29.538Z"}
{"command":"create","gl_project_path":"root/ci-test","level":"info","msg":"completed create","pid":1881,"relative_path":"@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.git","storage_name":"default","time":"2024-02-18T11:00:29.571Z"}
{"command":"create","gl_project_path":"root/ci-test.wiki","level":"info","msg":"started create","pid":1881,"relative_path":"@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.wiki.git","storage_name":"default","time":"2024-02-18T11:00:29.613Z"}
{"command":"create","gl_project_path":"apipost/be/apipost-work","level":"info","msg":"started create","pid":1881,"relative_path":"@hashed/4e/07/4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce.git","storage_name":"default","time":"2024-02-18T11:00:29.619Z"}
{"command":"create","gl_project_path":"root/ci-test.wiki","level":"info","msg":"completed create","pid":1881,"relative_path":"@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.wiki.git","storage_name":"default","time":"2024-02-18T11:00:29.622Z"}
{"command":"create","gl_project_path":"apipost/be/apipost-work","level":"info","msg":"completed create","pid":1881,"relative_path":"@hashed/4e/07/4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce.git","storage_name":"default","time":"2024-02-18T11:00:29.641Z"}
{"command":"create","gl_project_path":"apipost/be/apipost-work.wiki","level":"info","msg":"started create","pid":1881,"relative_path":"@hashed/4e/07/4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce.wiki.git","storage_name":"default","time":"2024-02-18T11:00:29.694Z"}
{"command":"create","gl_project_path":"apipost/be/apipost-work.wiki","level":"info","msg":"completed create","pid":1881,"relative_path":"@hashed/4e/07/4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce.wiki.git","storage_name":"default","time":"2024-02-18T11:00:29.704Z"}
2024-02-18 19:00:29 +0800 -- Dumping repositories ... done
2024-02-18 19:00:29 +0800 -- Dumping uploads ...
2024-02-18 19:00:29 +0800 -- Dumping uploads ... done
2024-02-18 19:00:29 +0800 -- Dumping builds ...
2024-02-18 19:00:29 +0800 -- Dumping builds ... done
2024-02-18 19:00:29 +0800 -- Dumping artifacts ...
2024-02-18 19:00:29 +0800 -- Dumping artifacts ... done
2024-02-18 19:00:29 +0800 -- Dumping pages ...
2024-02-18 19:00:29 +0800 -- Dumping pages ... done
2024-02-18 19:00:29 +0800 -- Dumping lfs objects ...
2024-02-18 19:00:29 +0800 -- Dumping lfs objects ... done
2024-02-18 19:00:29 +0800 -- Dumping terraform states ...
2024-02-18 19:00:29 +0800 -- Dumping terraform states ... done
2024-02-18 19:00:29 +0800 -- Dumping container registry images ... [DISABLED]
2024-02-18 19:00:29 +0800 -- Dumping packages ...
2024-02-18 19:00:29 +0800 -- Dumping packages ... done
2024-02-18 19:00:29 +0800 -- Dumping ci secure files ...
rake aborted!
Errno::ENOENT: No such file or directory @ rb_check_realpath_internal - /home/git/data/shared/ci_secure_files
/home/git/gitlab/lib/backup/files.rb:156:in realpath' /home/git/gitlab/lib/backup/files.rb:156:in app_files_realpath'
/home/git/gitlab/lib/backup/files.rb:46:in dump' /home/git/gitlab/lib/backup/manager.rb:71:in run_create_task'
/home/git/gitlab/lib/backup/manager.rb:227:in block in run_all_create_tasks' /home/git/gitlab/lib/backup/manager.rb:226:in each_key'
/home/git/gitlab/lib/backup/manager.rb:226:in run_all_create_tasks' /home/git/gitlab/lib/backup/manager.rb:47:in create'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:13:in block in create_backup' /home/git/gitlab/lib/tasks/gitlab/backup.rake:62:in lock_backup'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:10:in create_backup' /home/git/gitlab/lib/tasks/gitlab/backup.rake:101:in block (3 levels) in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/3.1.0/gems/sentry-ruby-5.10.0/lib/sentry/rake.rb:26:in execute' /home/git/gitlab/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in <top (required)>'
/usr/local/bin/bundle:25:in load' /usr/local/bin/bundle:25:in

'
Tasks: TOP => gitlab:backup:create
(See full trace by running task with --trace)
2024-02-18 19:00:29 +0800 -- Deleting tar staging files ...
2024-02-18 19:00:29 +0800 -- Cleaning up /home/git/data/backups/db
2024-02-18 19:00:29 +0800 -- Cleaning up /home/git/data/backups/repositories
2024-02-18 19:00:29 +0800 -- Cleaning up /home/git/data/backups/uploads.tar.gz
2024-02-18 19:00:29 +0800 -- Cleaning up /home/git/data/backups/builds.tar.gz
2024-02-18 19:00:29 +0800 -- Cleaning up /home/git/data/backups/artifacts.tar.gz
2024-02-18 19:00:29 +0800 -- Cleaning up /home/git/data/backups/pages.tar.gz
2024-02-18 19:00:29 +0800 -- Cleaning up /home/git/data/backups/lfs.tar.gz
2024-02-18 19:00:29 +0800 -- Cleaning up /home/git/data/backups/terraform_state.tar.gz
2024-02-18 19:00:29 +0800 -- Cleaning up /home/git/data/backups/packages.tar.gz
2024-02-18 19:00:29 +0800 -- Deleting tar staging files ... done
2024-02-18 19:00:29 +0800 -- Deleting backups/tmp ...
2024-02-18 19:00:29 +0800 -- Deleting backups/tmp ... done
2024-02-18 19:00:29 +0800 -- Deleting backup and restore PID file ... done

from docker-gitlab.

linux-golang avatar linux-golang commented on June 11, 2024

What is ci_secure_files and how do I deal with it
I look #2790

from docker-gitlab.

linux-golang avatar linux-golang commented on June 11, 2024

I've solved it, thank you

from docker-gitlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.