Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#3740 closed enhancement (fixed)

DB Upgrades

Reported by: Pedro Algarvio, aka, s0undt3ch <ufs@…> Owned by: Christian Boos
Priority: low Milestone: 0.10
Component: admin/console Version: devel
Severity: trivial Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Currently and most likely for the future also, trac on supports backing up SQLite databases.

So why not output:

Can only backup sqlite databases. Check your database documentation to backup(dump) your database.

instead of:

Can only backup sqlite databases.

Purposed patch:

  • /usr/lib/python2.4/site-packages/trac/env.py

    old new  
    299299
    300300        db_str = self.config.get('trac', 'database')
    301301        if not db_str.startswith('sqlite:'):
    302             raise EnvironmentError, 'Can only backup sqlite databases'
     302            raise EnvironmentError, 'Can only backup sqlite databases. ' + \
     303                    'Check your database documentation to backup(dump) ' + \
     304                    'your database.'
    303305        db_name = os.path.join(self.path, db_str[7:])
    304306        if not dest:
    305307            dest = '%s.%i.bak' % (db_name, self.get_version())

Attachments (0)

Change History (4)

comment:1 by Pedro Algarvio, aka, s0undt3ch <ufs@…>, 18 years ago

Milestone: 0.11

comment:2 by Pedro Algarvio, aka, s0undt3ch <ufs@…>, 18 years ago

Improved patch:

  • /usr/lib/python2.4/site-packages/trac/env.py

    old new  
    299299
    300300        db_str = self.config.get('trac', 'database')
    301301        if not db_str.startswith('sqlite:'):
    302             raise EnvironmentError, 'Can only backup sqlite databases'
     302            raise EnvironmentError, 'Can only backup sqlite databases. ' + \
     303                    'Check your database documentation to backup(dump) ' + \
     304                    'your database. If you wish not to backup also pass' + \
     305                    ' `--no-backup`'
    303306        db_name = os.path.join(self.path, db_str[7:])
    304307        if not dest:
    305308            dest = '%s.%i.bak' % (db_name, self.get_version())

comment:3 by Christian Boos, 18 years ago

Milestone: 0.110.10
Owner: changed from daniel to Christian Boos
Status: newassigned

Just got hit by that…

comment:4 by Christian Boos, 18 years ago

Resolution: fixed
Status: assignedclosed

Implemented in r3788, thanks for the suggestion!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.