163 words

Need disk usage and delete some old files

#1
2013-01-28 01:27

    Hello , is it possible to get disk usage of database ?

If disk usage becomes too high , delete old date files from database.

And recalculate disk usage back ?

 

kadirbasol
kadirbasol's picture
Joined on 2012-03-15
User Post #26
#2
2013-01-28 18:16

Since an ObjectDB database is a single file you can simply check its size using the length() method.

In embedded mode this should be simple.

In client-server mode - you can retrieve the server file system root by:

File root = com.objectdb.Utilities.getServerFileSystem(
    host, port, username, password, false);

and specific directory (and possibly file) using:

File dir = com.objectdb.Utilities.getServerFileSystem(
    host, port, username, password, path, false);

 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,406
#3
2013-01-30 15:46

    what about backup ?

can we make backup by only copying objectdb file?

if we make backup by objectdb file , will it make problem for future release of objectdb?

 

kadirbasol
kadirbasol's picture
Joined on 2012-03-15
User Post #27
#4
2013-01-30 16:55

You can read about backup on this manual page.

If you have questions about backup, please open a new forum thread, since this thread is titled "Need disk usage and delete some old files" and should be focus only on that subject.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,408

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel