Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recuperar los datos de tricket desde los volúmenes Docker #31

Closed
mefernandez opened this issue Jun 6, 2017 · 3 comments
Closed

Recuperar los datos de tricket desde los volúmenes Docker #31

mefernandez opened this issue Jun 6, 2017 · 3 comments

Comments

@mefernandez
Copy link
Collaborator

El servicio de spotify-docker-gc limpió todos los contenedores de la máquina services-tf después del apagado programado de la instancia AWS.

Los volúmenes de Docker aún están, pero hay que localizar el que correspondía a los datos de Tricket y restaurarlo.

@mefernandez
Copy link
Collaborator Author

[root@ip-172-31-33-44 volumes]# find . -name journal -type d -exec stat  -c "%n %y" {} \;
./4d80e915506826093cb7eabd8f01d23173f9eca717d6274e6710c2660af5540d/_data/journal 2017-03-13 18:38:24.102612514 +0100
./73dcc5d77b6da0385406e23d3ac1c52506fc0aad8388613bbc2ce8173d9e406d/_data/journal 2017-03-13 18:50:00.184014461 +0100
./f258c6ce75794b0267b56aef3799752c16fbb43dd7a6f7553d8cc6f4f59dd12d/_data/journal 2017-03-13 18:52:06.522996645 +0100
./289f14e1192ff65f4fae77ba72717f540a287d24abb9135bd6ce0117820cdbbf/_data/journal 2016-07-07 13:13:15.592606639 +0200
./f1fc0ad7cee86a641b8773b95204785c33d6a4ff9bc2d04879e07d2dc15cae0f/_data/journal 2016-07-11 10:40:42.560311878 +0200
./ec4af51872a23704400ea27129d91a22c53cff0f8e897e562ce233ded7b51a78/_data/journal 2017-03-13 18:59:31.964356537 +0100
./388e79c8aea9950c2dfcb38e5462d0503bb9ab0a8761f31a8cc0f390263ef944/_data/journal 2016-07-11 17:18:07.914315769 +0200
./662aca6cd525657f076eaca11a45e1038db4beb22c686e704b55726e9a79ef5f/_data/journal 2017-06-06 09:28:35.580207575 +0200
./b8a1b79d80eee2370f7c3757f74e977864165e9d1093e32749b43b11b9b9d660/_data/journal 2017-03-13 19:02:13.231504403 +0100
./4e25c682d3694b28d98641ddcdeca727633031b066e2ea147d618d17da089214/_data/journal 2017-03-13 19:05:14.193169158 +0100

@mefernandez
Copy link
Collaborator Author

Finalmente se recuperó el dump del DD y Alexis reinsertó los últimos tickets a mano.

Se renumeraron las secuencias y los tickets insertados:

docker run -it --link tricket_mongo_1:mongo --rm mongo sh -c 'exec mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/tricket"'

> use tricket

> db.counters.updateOne({_id: "ONDEVIO"}, {$set: {seq: 53}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.counters.updateOne({_id: "COITT"}, {$set: {seq: 25}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.counters.updateOne({_id: "ICAV"}, {$set: {seq: 264}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.counters.updateOne({_id: "COAATTERUEL"}, {$set: {seq: 26}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.counters.updateOne({_id: "COAATZ"}, {$set: {seq: 49}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.counters.updateOne({_id: "CERVIGLAS"}, {$set: {seq: 22}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.counters.updateOne({_id: "APATGN"}, {$set: {seq: 20}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.counters.updateOne({_id: "CAATLLEIDA"}, {$set: {seq: 5}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.counters.updateOne({_id: "CATEBRE"}, {$set: {seq: 24}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.counters.updateOne({_id: "COAATMU"}, {$set: {seq: 55}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.tickets.updateOne({ticket_id: "ONDEVIO-5"}, {$set, {ticket_id: "53"}});
2017-06-07T10:01:29.427+0000 E QUERY    [thread1] SyntaxError: invalid property id @(shell):1:54
> db.tickets.updateOne({ticket_id: "ONDEVIO-5"}, {$set, {ticket_id: "ONDEVIO-53"}});
2017-06-07T10:01:58.075+0000 E QUERY    [thread1] SyntaxError: invalid property id @(shell):1:54
> db.tickets.updateOne({ticket_id: "ONDEVIO-5"}, {$set, {status: "OpenED"}});
2017-06-07T10:04:14.210+0000 E QUERY    [thread1] SyntaxError: invalid property id @(shell):1:54
> db.tickets.updateOne({ticket_id: "ONDEVIO-5"}, {$set: {ticket_id: "ONDEVIO-53"}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.tickets.updateOne({ticket_id: "COITT-2"}, {$set: {ticket_id: "COITT-25"}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.tickets.updateOne({ticket_id: "ICAV-13"}, {$set: {ticket_id: "ICAV-264"}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.tickets.updateOne({ticket_id: "COAATTERUEL-1"}, {$set: {ticket_id: "COAATTERUEL-26"}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.tickets.updateOne({ticket_id: "COAATZ-4"}, {$set: {ticket_id: "COAATZ-49"}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.tickets.updateOne({ticket_id: "CERVIGLAS-1"}, {$set: {ticket_id: "CERVIGLAS-22"}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.tickets.updateOne({ticket_id: "APATGN-2"}, {$set: {ticket_id: "APATGN-20"}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.tickets.updateOne({ticket_id: "CAATLLEIDA-1"}, {$set: {ticket_id: "CAATLLEIDA-5"}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.tickets.updateOne({ticket_id: "CATEBRE-1"}, {$set: {ticket_id: "CATEBRE-24"}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
> db.tickets.updateOne({ticket_id: "COAATMU-8"}, {$set: {ticket_id: "COAATMU-55"}});
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }

@mefernandez
Copy link
Collaborator Author

mefernandez commented Jun 7, 2017

También se cambiaron fechas de algunas notas con worklog > 0

db.tickets.updateOne({ticket_id: "ICAV-264"}, {$set: {"notes.1.dateCreated": "2017-05-26T09:22:56.880Z"}});
db.tickets.updateOne({ticket_id: "ICAV-265"}, {$set: {"notes.1.dateCreated": "2017-05-10T10:24:17.547Z"}});
db.tickets.updateOne({ticket_id: "ICAV-266"}, {$set: {"notes.1.dateCreated": "2017-05-17T10:26:42.732Z"}});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant