Creating backups manually
Tuesday, 2 January 2024 · 3 messages · last reply 5 Jan 2024
MD
Matthew Dziuban2 Jan 2024 20:59 #
Hi all,
I'm interested in creating backups manually so I can use a different compression algorithm. Based on the source code[1], it looks like backups are just created by adding each file (excluding upd.basex) in the database directory to a .zip file, so I could do the same using tar and my compression algorithm of choice. Is my understanding correct or am I missing some other logic?
Thanks,
Matt
[1]
https://github.com/BaseXdb/basex/blob/main/basex-core/src/main/java/org/basex/core/cmd/CreateBackup.java#L90-L119
CG
Christian Grün3 Jan 2024 17:25 #
Hi Matt,
Your assumption is correct: Database backups are nothing else than zipped archives of the corresponding database subdirectory located in the 'data' directory.
If you create backups on your own, you should ensure that no updates are currently running during your update operation. If you use CREATE BACKUP or
db:create-backup, BaseX will take care of that.
Hope this helps,
ChristianQuoted text · Matthew Dziuban · 13 lines
I'm interested in creating backups manually so I can use a different > compression algorithm. Based on the source code[1], it looks like backups > are just created by adding each file (excluding upd.basex) in the > database directory to a .zip file, so I could do the same using tar and > my compression algorithm of choice. Is my understanding correct or am I > missing some other logic? > > Thanks, > Matt > > [1] > https://github.com/BaseXdb/basex/blob/main/basex-core/src/main/java/org/basex/core/cmd/CreateBackup.java#L90-L119 >
MD
Matthew Dziuban5 Jan 2024 05:14 #
Perfect, thank you, Christian!
Quoted text · Christian Grün · 31 lines
On Wed, Jan 3, 2024 at 11:25 AM Christian Grün <christian.gruen at gmail.com> wrote: > Hi Matt, > > Your assumption is correct: Database backups are nothing else than zipped > archives of the corresponding database subdirectory located in the 'data' > directory. > > If you create backups on your own, you should ensure that no updates are > currently running during your update operation. If you use CREATE BACKUP or > db:create-backup, BaseX will take care of that. > > Hope this helps, > Christian > > > > I'm interested in creating backups manually so I can use a different >> compression algorithm. Based on the source code[1], it looks like backups >> are just created by adding each file (excluding upd.basex) in the >> database directory to a .zip file, so I could do the same using tar and >> my compression algorithm of choice. Is my understanding correct or am I >> missing some other logic? >> >> Thanks, >> Matt >> >> [1] >> https://github.com/BaseXdb/basex/blob/main/basex-core/src/main/java/org/basex/core/cmd/CreateBackup.java#L90-L119 >> >
Written for BaseX 10.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery