mysql -u root -p --database=redmine -B -N -e "SHOW TABLES" | awk '{print "SET foreign_key_checks = 0; ALTER TABLE", $1, "CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; SET foreign_key_checks = 1; "}' | mysql -u root -p --database=redmine
rake aborted!
ActiveRecord::ConnectionNotEstablished: Unsupported charset: '"utf8mb4_unicode_ci"'
FROM postgres:14.3
RUN localedef -i de_DE -c -f UTF-8 -A /usr/share/locale/locale.alias de_DE.UTF-8
ENV LANG de_DE.utf8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_02_24_194639) do
create_table "attachments", id: :integer, charset: "latin1", force: :cascade do |t|
...
create_table "auth_sources", id: :integer, charset: "latin1", force: :cascade do |t|
...
create_table "boards", id: :integer, charset: "latin1", force: :cascade do |t|
...
root@kube2:/data/tmp# svn2git http://192.168.1.2:13000/svn/bgpbo/ --authors ./authors.txt --username sync
command failed:
git checkout -f master
root@kube2:/data/tmp# git checkout -f master
error: pathspec 'master' did not match any file(s) known to git
root@kube2:/data/tmp# git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
authors.txt
nothing added to commit but untracked files present (use "git add" to track)
root@kube2:/data/tmp# git commit -m "Initial commit" --allow-empty
[master (root-commit) a15dd94] Initial commit
root@kube2:/data/tmp# git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
authors.txt
nothing added to commit but untracked files present (use "git add" to track)
root@kube2:/data/tmp# git checkout -f master
Already on 'master'
root@kube2:/data/tmp#
#!/bin/sh
# Set _HERE_ name of the new virtual machine
new=$1
if [ "$new" != "" ]
then
# Create folder for new virtual machine
mkdir /vmfs/volumes/DS2/$new
# Clone virtual disk from prepared template
# and move two created files (.vmdk and -flat.vmdk) to the new location
cd /vmfs/volumes/DS2/susetmp
vmkfstools -i susetmp.vmdk $new.vmdk -d thin
mv /vmfs/volumes/DS2/susetmp/$new* /vmfs/volumes/DS2/$new
# Copy .vmx file to the new location
# and replase template name "susetmp" to the new name of the new virtual machine
cp /vmfs/volumes/DS2/susetmp/susetmp.vmx /vmfs/volumes/DS2/$new/$new.vmx
sed -i 's/susetmp/'$new'/g' /vmfs/volumes/DS2/$new/$new.vmx
else
echo
echo This script copies new virtual machine from prepared template.
echo The template should be located at /vmfs/volumes/DS2/susetmp
echo
echo Example of using:
echo ./clone_suse.sh [new_vm_name]
echo ./clone_suse.sh suse5
echo
echo After run script you should "Register an existing virtual machine" in the ESXi console
echo
fi
# Now you should "Register an existing virtual machine" in the ESXi console
# from the new .vmx file (/vmfs/volumes/DS2/$new/$new.vmx)
# https://kb.vmware.com/s/article/1029513
[root@localhost:/vmfs/volumes/61129172-d1eab270-9f88-1c697a0e9500/susetmp] ls -lah *.vmdk
-rw------- 1 root root 16.0G Dec 9 12:28 susetmp-flat.vmdk
-rw------- 1 root root 473 Dec 9 12:28 susetmp.vmdk
[root@localhost:/vmfs/volumes/61129172-d1eab270-9f88-1c697a0e9500/susetmp] du -sh
4.1G .
cd susetmp
vmkfstools -i susetmp.vmdk suse6.vmdk -d thin
cd ..
mkdir suse6
mv ./susetmp/suse6* ./suse6
cp ./susetmp/susetmp.vmx ./suse6/suse6.vmx
подправить susex.vmx - заменить на susetmp на suse6
vi ./suse6/suse6.vmx
:
%s/susetmp/suse6/g
:wq
root@kube2:/data/amk# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
root@kube2:/data/amk# svn2git http://192.168.1.2:13000/svn/bgpbo/ --authors /data/amk/authors.txt --username sync
Initialized empty Git repository in /data/amk/.git/
Authentication realm: <http://192.168.1.2:13000> SVN repository: BGPBO (prev)
Password for 'sync': No input requested.
No input requested.
### Ручное добавление пароля в ~/.subversion/auth/svn.simple/01868dff98ac872415817fc650c00e78
root@kube2:/data/amk# svn2git http://192.168.1.2:13000/svn/bgpbo/ --authors /data/amk/authors.txt --username sync
Initialized empty Git repository in /data/amk/.git/
### Примерно 10 сек задумчивости
command failed:
git checkout -f master
root@kube2:/data/amk# git branch
root@kube2:/data/amk# git branch -m master
error: refname refs/heads/master not found
fatal: Branch rename failed
root@kube2:/data/amk# git branch master
fatal: Not a valid object name: 'master'.
root@kube2:/data/amk# git branch new
fatal: Not a valid object name: 'master'.
gem install svn2git
amk:/data1/amk # cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20221001"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20221001"
amk:/data1/amk # gem install svn2git
Fetching svn2git-2.4.0.gem
Successfully installed svn2git-2.4.0
Ignoring nokogiri-1.13.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.13.8
Parsing documentation for svn2git-2.4.0
Installing ri documentation for svn2git-2.4.0
Done installing documentation for svn2git after 0 seconds
1 gem installed
amk:/data1/amk # svn2git
If 'svn2git' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf svn2git
amk:/data1/amk # find / -name svn2git
/usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/lib/svn2git
/usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/bin/svn2git
amk:/data1/amk # /usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/bin/svn2git http://192.168.1.2:13000/svn/bgpbo/ --authors /data/amk/authors.txt --username sync
Ignoring nokogiri-1.13.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.13.8
Ignoring ruby-augeas-0.5.0 because its extensions are not built. Try: gem pristine ruby-augeas --version 0.5.0
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /data1/amk/.git/
Authentication realm: <http://192.168.1.2:13000> SVN repository: BGPBO (prev)
Password for 'sync': #<Thread:0x00007fb3a89e7010 /usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/lib/svn2git/migration.rb:431 run> terminated with exception (report_on_exception is true):
/usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/lib/svn2git/migration.rb:438:in `block (3 levels) in run_command': undefined local variable or method `stdin'
### Ручное добавление пароля в ~/.subversion/auth/svn.simple/01868dff98ac872415817fc650c00e78
amk:/data1/amk # /usr/lib64/ruby/gems/3.1.0/gems/svn2git-2.4.0/bin/svn2git http://192.168.1.2:13000/svn/bgpbo/ --authors /data1/amk/authors.txt --username sync
Ignoring nokogiri-1.13.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.13.8
Ignoring ruby-augeas-0.5.0 because its extensions are not built. Try: gem pristine ruby-augeas --version 0.5.0
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /data1/amk/.git/
### Примерно 10 сек задумчивости
command failed:
git checkout -f master
amk:/data1/amk # git branch -m master
amk:/data1/amk # git branch master
fatal: not a valid object name: 'master'
amk:/data1/amk # git branch new
fatal: not a valid object name: 'master'
root@kube2:/data/amk# svn2git http://192.168.1.2:13000/svn/amk/ --authors /data/amk/authors.txt
Initialized empty Git repository in /data/amk/.git/
command failed:
git checkout -f master
root@kube2:/data/amk# git checkout master
error: pathspec 'master' did not match any file(s) known to git
root@kube2:/data/amk# git branch
root@kube2:/data/amk#
Надо было не в redmine копать, а в mysql.
Там по-умолчанию latin1_swedish_ci, а redmine не просит изменить.
Хоть и задавал REDMINE_DB_ENCODING: utf8
Помогла установка кодировки и сортировки сервера через command в контейнере mysql.
https://dev.mysql.com/doc/refman/8.0/en/charset-se...