compress
compresscmd xz
compressoptions -9
---------------
compress manually:
--verbose show progress
To reduce system load:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652600
-M xz option sets memory limit, please check man, for example 32M is required for -3 compression option, for example :
compressoptions -3 -M 128M
also cpulimit may be useful:
cpulimit -l 20
sets cpu usage to 20%
for example:
cpulimit -l 20 nice -n 19 ionice -c3 /usr/sbin/logrotate /etc/logrotate.conf
#!/bin/sh
#set -x
required_free_percentage=93
percent_free=`df -h | grep /dev/mapper/data-graphite | awk '{print $5}' | sed 's/%//'`
echo ${percent_free}
i=365
while [ ${percent_free} -gt ${required_free_percentage} ]
do
#echo ${i}
find /var/lib/carbon/whisper/ -type f -mtime +${i} | xargs -n1 -r rm
percent_free=`df -h | grep /dev/mapper/data-graphite | awk '{print $5}' | sed 's/%//'`
#echo ${percent_free}
i=$(( $i -1 ))
done
$ cat lvm-playbook.yml
---
- hosts: all
become: yes
tasks:
- name: Create Volume Group
lvg:
vg: "{{ vg_name }}"
pvs: "{{ pvs }}"
- name: Create Logical Volume
lvol:
vg: "{{ vg_name }}"
lv: "{{ lv_name }}"
size: "{{ lv_size }}"
- name: Creafe File System
filesystem:
fstype: ext4
dev: "/dev/{{ vg_name }}/{{ lv_name }}"
- name: Mount Logical volume FS
mount:
name: "/{{ mount_name }}"
src: "/dev/{{ vg_name }}/{{ lv_name }}"
fstype: ext4
state: mounted
$ cat inventory.ini
127.0.0.1:22222 ansible_user=gigauser pvs=/dev/sdb vg_name=vgname1 lv_name=lv_name1 lv_size=50M mount_name=vgmount
$ ansible-playbook -i inventory.ini lvm-playbook.yml --ask-become-pass
# sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
or
# gitlab-rails dbconsole --database main
gitlabhq_production=# insert into users (name, username, email, notification_email, projects_limit, state, created_at, confirmed_at) values ('Name Surname', 'userlogin',
After that password can be restored via password recovery procedure.
Set user admin permissions:
gitlabhq_production=# UPDATE users SET admin = 't' WHERE email like
Links:
https://docs.gitlab.com/ee/security/reset_user_password.html