Trying to migrate on production database. Does it ...
# contributing-to-airbyte
i
Trying to migrate on production database. Does it work? Don’t understand what to do
it should be automatic and you should not need to do anything
u
what is happening now?
u
It’s finished with an error that I have no space left 😄 trying again after volume extending
u
cool! let us know if an error happens!
l
it’s eating the space like crazy. 1GB per minute
u
@Davin Chia (Airbyte) is there any way to decrease the size of export configuration? is it exporting ALL for every upgrade version?
u
no just the one you are at
u
I'm guessing there is a large job history
u
@Chris (deprecated profile) I vaguely remember us chatting about pruning job history - did we implement that?
u
@Jenny Brown?
u
it’s used about 100GB already and not finished, just upgraded from 0.26 to 0.27
l
so the question is how to purge logs manually?
u
I haven't tested this, but if you are okay losing job history, it should be possible to connect to the jobs db drop all records older than a certain timestap
u
how to purge logs manually?
1. Purge in exported file. a. You can export the configs in the old Airbyte version. b. Look for the
ATTEMPTS.yaml
under
airbyte_db
, and remove old job attempt entries from that file. c. Import the configs back. 2. Purge in the database. a. Connect to the airbyte internal database:
docker exec -it airbyte-db -U docker -d airbyte
assuming you are using the default one. b. Look into the
jobs
table, and delete old records.
u
Before purging, please always export the configs and keep a backup.
u
We are deprecating the old file-based migration system. Once you upgrade to Airbyte 0.29.x, the migration will run directly in the database, so there won’t be any disk space issue.
u
what is it? my tmp folder in airbyte-server is full of this kind of files
l
they are eating the space
u
where is the migration at?
u
the automatic migration mechanism will export the database to a tmp folder so it can import it in the next version. I'm guessing those files are it. @Subodh (Airbyte) can you confirm?
u
@Davin Chia (Airbyte) going from 0.28 to 0.29
u
but it’s exporting the database for every version, one version takes ~50GB
u
if you aren't going to run out of space, I would wait till it finishes - you are almost there. it is possible to delete the files for the versions < 0.28 now but we can't reliably tell what is for what version
l
the migration only runs for minor versions so this is the last one
u
@Ivan Fokeev, what is inside the
schemasxxxxxxx
directories? If they are old database dumps, you can delete the old ones. I checked the codebase but I cannot verify the content of these directories in the code. Our best guess is that it is the intermediate auto migration dumps.
u
@Subodh (Airbyte), do you know which class generates these
schemas<timestamp>
directories?
u
noooo
u
it’s still has 47GB free
u
it might be the disk space given to the docker agent?
l
no
u
I would give Liren's option 2 suggestion a shot and see if the job history can be trimmed
u
the bad thing also that I need to migrate again from the beginning
u
Job history purging went in a few weeks ago. It won’t keep much job history. Not sure if that’s related here or not, just answering the question that was asked earlier in the thread.
u
I deleted all airbyte volumes and see my sources, destinations and connections in the listings. So may be it will work fine
u
why I can’t cancel sync jobs?
u
@Davin Chia (Airbyte) @Jenny Brown @Liren Tu could you please explain, why I can’t cancel attempts? It’s creating “pending” job again and again after clicking on “cancel”
u
It’s configured to schedule a job every 30 mins
u
If you want to control when jobs are scheduled, you can set the timing to manual