db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Vogel" <lars.vo...@googlemail.com>
Subject Re: Create Copy of Database with the necessary files
Date Wed, 22 Aug 2007 17:16:23 GMT
Hi Oystein,

thank you for your reply. By unnecessary files I mean file I did accidently
create via cut and paste.

I did manually delete the target directory before the copy.

I'm using Database Version - (485682shipped with Java 6.0.

Currently the backup copies everything. I did test this the following ways:
I copied a file "c21431.dat" to a similar file "c21432.dat" and did the
backup. "c21432.dat" was also copied.

If you believe that this is a bug I can open a bug report for this.

Best regards, Lars

2007/8/21, Oystein Grovlen - Sun Norway <Oystein.Grovlen@sun.com>:
> Lars Vogel wrote:
> > Hello,
> >
> > is there a way to create a database copy with only the necessary files?
> I am not quite sure I understand what you mean by the necessary files.
> >
> > Background: I did copy "my" database back and forth between a server and
> > my PC. I always copied the whole directory and did paste it into the
> > existing target directory in the assumption that all files would be
> > overwritten.
> >
> > I realized later that as new files are created the file set is not
> > always the same. Now I want to identify the files which are still used
> > as the directory is unnecessary large for my small dataset.
> Creating and dropping tables and indexes will create and remove the
> corresponding files, respectively.  Compressing a table may also create
> a new file for it.
> Note that many of the files represents system tables that are necessary
> even if you do not access them directly.
> Is it not an option to recreate the target directory before you do the
> copy?  That way, there should be no unecessary files.
> >
> > The CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE seems to copy all database
> > files even if they are not in use (see below for the jave coding). Is
> > there a ways to identify and copy only the used files?
> >
> > Best regards, Lars
> >
> >
> >         CallableStatement cs = con
> >         .prepareCall("CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE(?)");
> >         cs.setString(1, "c:/temp/backupdir3");
> >         cs.execute();
> >         cs.close();
> Which version are you using?  As far as I know, the non-blocking backup
> mechanism introduced in 10.2, does only backup the tables that are
> defined in the current database dictionary.
> --
> Øystein

View raw message