Notes
Notes - notes.io |
DOCKER ayağa kaldırıldıktan sonra DOCKERHUB dan MSSQL çekilir
• docker pull microsoft/mssql-server-linux
MSSQL şifresi ayarlanır ve Container ayağa kaldırılır.
• docker container run -d --name <CONTAINER_NAME> -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<DB_PASSWORD_GIRILIR>' -p 1433:1433 -v avansas-mssql-db:/var/lib/docker/mssql microsoft/mssql-server-linux
Container kurulumu kontrol edilir, UP durumda değilse container listelenir ve container id ile başlatılır
• docker container ls -a
• docker container start <CONTAINER_ID_ILK_3>
DOCKER içerisinde “backup” folderı oluştur
• sudo docker exec -it <CONTAINER_NAME> mkdir /var/opt/mssql/backup
PP ortamından alınan “backup” dosyasını DOCKER Container içerisine kopyala
• sudo docker cp hybrispp_backup.bak <CONTAINER_NAME>:/var/opt/mssql/backup
“BAK” dosyasına Container içerisinde RESTORE FILE işlemi uyguluyoruz
• sudo docker exec -it <CONTAINER_NAME> /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '< DB_PASSWORD_GIRILIR >' -Q 'RESTORE FILELISTONLY FROM DISK = "/var/opt/mssql/backup/hybrispp_backup.bak"' | tr -s ' ' | cut -d ' ' -f 1-2
Aşağıdaki çıktı elde edilmesi gerekiyor:
HYBRIS.PROD D:MSSQL13.MSSQLSERVERMSSQLDATAHYBRIS.PP.mdf
HYBRIS.PROD2 E:SQLDataHYBRIS.PP2.ndf
HYBRIS.PROD3 F:SQLDataHYBRIS.PP3.ndf
HYBRIS.PROD4 G:SQLDataHYBRIS.PP4.ndf
HYBRIS.PROD_log L:SQLLogHYBRIS.PP_log.ldf
Restore edilen dosyalara Restore Database işlemi uyguluyoruz
• sudo docker exec -it <CONTAINER_NAME> /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '< DB_PASSWORD_GIRILIR >' -Q 'RESTORE DATABASE [HYBRIS.PP] FROM DISK = "/var/opt/mssql/backup/hybrispp_backup.bak" WITH MOVE "HYBRIS.PROD" TO "/var/opt/mssql/data/HYBRIS.PP.mdf", MOVE "HYBRIS.PROD2" TO "/var/opt/mssql/data/HYBRIS.PP2.ndf", MOVE "HYBRIS.PROD3" TO "/var/opt/mssql/data/HYBRIS.PP3.ndf", MOVE "HYBRIS.PROD4" TO "/var/opt/mssql/data/HYBRIS.PP4.ndf", MOVE "HYBRIS.PROD_log" TO "/var/opt/mssql/data/HYBRIS.PP_log.ldf"'
Docker içerisinde ilgili dosyaların taşındığını control ediyoruz
• sudo docker exec -it <CONTAINER_NAME> bash
• cd /var/opt/mssql/data
• ls
Aşağıdaki çıktı elde edilmesi gerekiyor:
HYBRIS.PP.mdf HYBRIS.PP2.ndf HYBRIS.PP3.ndf HYBRIS.PP4.ndf HYBRIS.PP_log.ldf
Database Verify
• sudo docker exec -it <CONTAINER_NAME> /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '< DB_PASSWORD_GIRILIR >' -Q 'SELECT Name FROM sys.Databases'
Database bağlama işlemi tamamlandıktan sonra local.properties de mssql konfigürasyonu var mı kontrol edilir. Yoksa eklenir.
<HYBRIS_DIR>config/local.properties
#MSSQL
db.url=jdbc:sqlserver://localhost:1433;DatabaseName=HYBRIS.PP
db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
db.username=sa
db.password=GyjU!xz+5*12
db.pool.dumpThreadsOnConnectionError=true
Son olarak console dan sırasıyla aşağıdaki komutlar koşulur ve platform ayağa kaldırılır.
<HYBRIS_DIR>bin/platform
./setantenv.sh
ant clean all;
build success verdikden sonra
ant updatesystem
ant update tamamlandıktan sonra
./hybrisserver.sh
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team