Opened 13 years ago
Closed 10 years ago
#10529 closed enhancement (worksforme)
Document Backup of database on trac-admin hotcopy
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | database backend | Version: | 0.12.2 |
Severity: | normal | Keywords: | documentation |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When one performs a trac-admin hotcopy
it should backup the database, unless --no-database
is specified, for all db back-ends. Currently it appears to only do this for the SQLite back-end. Apparently trac-admin
does have the ability to backup the database for other back-ends when performing an upgrade.
Attachments (0)
Change History (14)
follow-up: 2 comment:1 by , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 13 years ago
Keywords: | documentation added |
---|---|
Resolution: | worksforme |
Severity: | major → normal |
Status: | closed → reopened |
Summary: | Backup database on trac-admin hotcopy with all backends → Document Backup of database on trac-admin hotcopy |
Replying to rblank:
Excellent. However, then TracBackup should reflect this.
Oh, I see 0.13/TracBackup is the newer version. However, Restoring a Backup needs work for this only describes how to restore if one is using SQLite.
follow-up: 4 comment:3 by , 13 years ago
Replying to Mark Potter <mpotter@…>:
However, Restoring a Backup needs work for this only describes how to restore if one is using SQLite.
I had the impression that people using PostgreSQL or MySQL would know their tool well enough to know how to restore from an SQL dump, so we wouldn't need to document it here. This isn't the case for SQLite, as it requires no administration at all and can therefore easily be used by people with no DB background at all. But if you think it would be useful, feel free to edit that page as you see fit.
comment:4 by , 13 years ago
Replying to rblank:
I had the impression that people using PostgreSQL or MySQL would know their tool well enough to know how to restore from an SQL dump, so we wouldn't need to document it here.
There are two types of people who would be using an alternative database back-end: Those who know and prefer the alternative back-end and those who need to use an alternative back-end because of some reason. The first group needs no to minimal documentation, however the second group needs moderate to detailed documentation.
Since we are in the context of backups, and thus disaster recovery planning, one wants to make sure one knows very well, or has well documented, how to restore the backups. When one is in the midst of disaster recovery, one does not want to research how to restore.
But if you think it would be useful, feel free to edit that page as you see fit.
Would love to, but alas I am in the second group. I recently (Jan 3rd) changed my back-end from SQLite to PostgreSQL because of Bitten performance issues. Barely know PostgreSQL, but learning.
comment:5 by , 12 years ago
Milestone: | → undecided |
---|
All the tickets for {20} from last year have probably been seen multiple times by now, yet are still to be triaged…
follow-up: 7 comment:6 by , 11 years ago
Command that I just used to restore:
psql -U postgres -f postgresql.dump
Hope it worked. More details from someone more knowledgeable may be needed.
comment:7 by , 11 years ago
Replying to mpotter@…:
Command that I just used to restore:
psql -U postgres -f postgresql.dump
Hope it worked.
Nope, needed to add a -d
database option.
From the trac.ini, [trac], database setting:
database =
postgres://
user:
password@localhost/
database
The restore command is thus:
psql -U
user-d
database-f postgresql.dump
comment:8 by , 10 years ago
Milestone: | undecided → 1.0.3 |
---|
comment:9 by , 10 years ago
Owner: | set to |
---|---|
Status: | reopened → assigned |
comment:10 by , 10 years ago
Milestone: | 1.0.3 |
---|---|
Resolution: | → worksforme |
Status: | assigned → closed |
Documentation updated in TracBackup@30. I suggest using the MailingList for further discussion if you'd like to have additional recipes or best practices in the documentation.
comment:11 by , 10 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
This appears to be the correct command for restoring a 0.12 backup, but not 1.0. Also the 0.12 version says that the backup only exists for SQLite; which is was started this ticket.
I'll fix the 1.0 and 0.12 based on this model, but someone else should review and what about other DB back-ends.
comment:12 by , 10 years ago
Fine if you want to try and improve the documentation, but please close the ticket afterwards. There's no point in indefinitely having an open ticket if no one is going to take responsibility for improving the documentation. Like I said, raising this on the mailing list will likely lead to more input than you'll get here.
comment:13 by , 10 years ago
Believe resolved with TracBackup@31 and 0.12/TracBackup@3. However:
- Someone else should review.
- Still needs MySQL entries.
Close if you wish; I have no more skin in the game.
comment:14 by , 10 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
This is already implemented on trunk.