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

gbak option to backup/restore to another character set [CORE4661] #4974

Open
firebird-automations opened this issue Jan 8, 2015 · 9 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Peter Vandel (petervandel)

Jira_subtask_outward CORE5963

gbak already backups data in a transportable format (by default).
An option to specify the desired target character set is very welcome.
This will save a lot of time and will prevent the need of using thrd-party tools instead (which often fail and are time-consuming).

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

???????

@firebird-automations
Copy link
Collaborator Author

Commented by: @WarmBooter

For this, gbak would need to change the metadata of the database. Even if it was able to do that, what should gbak do if the original charset has characters that are not available in the destination charset?

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

As Carlos pointed out, there are several issues which make the "auto-magic" changing the charset of a database very difficult, if not impossible.

@firebird-automations
Copy link
Collaborator Author

Modified by: Peter Vandel (petervandel)

priority: Major [ 3 ] => Minor [ 4 ]

@MarvinKlein1508
Copy link

Any update on this?

@mrotteveel
Copy link
Member

I'd say it is unlikely to ever get implemented for the reasons provided earlier. Personally, I think this issue should be closed, what do you think @dyemanov ?

@dyemanov
Copy link
Member

I can see two cases it could be useful and unlikely to cause any errors:

  1. Converting NONE database into a proper charset (data is actually stored in)
  2. Migrating from WIN/ISO-something into UTF8

Perhaps they will be 98% of all cases. And migrating via a script is a PITA for big databases.

That said, I also see problems. What if different fields have different charsets defined, should all of them be changed? Should we ignore OCTETS fields while converting data? What if the longer (in bytes) field definition would prevent some existing indices from being created? _charset literal prefixes inside PSQL routines cannot be migrated to another charset. Too many border cases to worry about, IMO. So perhaps we should really close it as undoable in general.

@aafemt
Copy link
Contributor

aafemt commented Jun 14, 2021

It may be done in conjunction with "--data-only" switch by setting corresponding connection charset but it would be better to create a separate utility ("exp"?) with wider set of options for exporting/importing.

@asfernandes
Copy link
Member

Improved ISQL extract (which separation of triggers and indexes) plus GBAK data-only may be useful for that and other cases.

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

No branches or pull requests

6 participants