Opened 7 years ago

Closed 6 years ago

#10946 closed defect (worksforme)

Entries lost, structure for 1.0 changed

Reported by: Dirk Stöcker Owned by: Dirk Stöcker
Priority: normal Component: TracMigratePlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0


Hello, this plugin looses additional tables like for votes plugin or spamfilter. It should copy any tables, not only the ones it knows.

sqlite ".tables" command shows all tables.

Also the structure of attachements and other files changed in 1.0, so it no longer macthes the structure in the second copy step.

Attachments (0)

Change History (8)

comment:1 Changed 7 years ago by Jun Omae

Status: newassigned
Trac Release: 1.0

Humm, first issue is not reproduced with VotePlugin and TracMigratePlugin. The votes table and the records are copied.

Second issue is reproduced. It should copy the files directory instead of attachments.

$ ~/venv/trac/1.0.1/bin/trac-admin ~/var/trac/ticket10946 migrate ~/var/trac/ticket10946-migrate sqlite:db/trac.db
Copying tables:
  attachment table... 1 records.
  auth_cookie table... 1 records.
  cache table... 2 records.
  component table... 2 records.
  enum table... 13 records.
  milestone table... 4 records.
  node_change table... 0 records.
  permission table... 17 records.
  report table... 8 records.
  repository table... 0 records.
  revision table... 0 records.
  session table... 1 records.
  session_attribute table... 1 records.
  ticket table... 0 records.
  ticket_change table... 0 records.
  ticket_custom table... 0 records.
  version table... 2 records.
  votes table... 1 records.
  wiki table... 58 records.
Copying directories:
OSError: [Errno 2] No such file or directory: '/home/jun66j5/var/trac/ticket10946-migrate/attachments'
  attachments directory... $
$ sqlite3 ~/var/trac/ticket10946-migrate/db/trac.db
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> select * from votes;

comment:2 Changed 7 years ago by Jun Omae

(In [12737]) tracmigrate: copy files directory instead of attachments on Trac 1.0+. The attachments directory is moved to files by trac/upgrades/ (refs #10946)

comment:3 Changed 7 years ago by Jun Omae

First issue is not reproduced even with spam filter plugin. This plugin correctly copies spamfilter_bayes and spamfilter_log tables on my environment. Could you please let me know the details?

comment:4 Changed 7 years ago by Dirk Stöcker

Hmm, my migration is over, so actually I don't need that anymore :-).

I did setup a postgres db from scratch. Took my sqlite db, did migrate. Then it required a trac upgrade and after i checked all data form spamfilter and vote plugin were lost. In the process I did update from 1.0 to 1.0.1, but that should not be the reason.

What info would help you to fix that for other users?

comment:5 Changed 7 years ago by Jun Omae

Ok. Thanks for the details! I try to reproduce this weekend.

comment:6 Changed 7 years ago by Jun Omae

Unfortunately, still not reproduced on migration from SQLite to PostgreSQL with Trac 1.0.1....

Could you please attach the trac.ini file of Trac as source on migration? If so, please mask any sensitive data in the trac.ini file.

comment:7 Changed 7 years ago by Dirk Stöcker

Owner: changed from Jun Omae to Dirk Stöcker
Status: assignednew

I'll try myself on a clean setup when I have time.

comment:8 Changed 6 years ago by Dirk Stöcker

Resolution: worksforme
Status: newclosed

I have no time to check at all. Closing.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Dirk Stöcker.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.