导出用户清单查询脚本
su - gitlab-psql -c "echo 'select id,username,name,email,state,created_at,last_sign_in_at from users order by created_at desc;' |psql -h /var/opt/gitlab/postgresql -d gitlabhq_production > /tmp/users.txt"
导出项目清单脚本
su - gitlab-psql -c "echo 'select id,name,path,description,created_at,last_activity_at,creator_id from projects order by created_at;' |psql -h /var/opt/gitlab/postgresql -d gitlabhq_production > /tmp/projects.txt"
导出用户权限脚本
su - gitlab-psql -c "echo 'select project_id,user_id from user_interacted_projects;' |psql -h /var/opt/gitlab/postgresql -d gitlabhq_production > /tmp/projectrole.txt"