| Anonymous | Login | Signup for a new account | 2013-05-19 15:21 WAT | ![]() |
| Main | My View | View Issues | Roadmap | My Account |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0001383 | Anope Development (1.9.x series) | Other | public | 2012-03-06 01:00 | 2012-05-07 03:11 | |||
| Reporter | cbiedl | |||||||
| Assigned To | Adam | |||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | resolved | Resolution | fixed | |||||
| Platform | Linux | OS | OS Version | |||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0001383: Database file backup fails for DatabaseFile with path | |||||||
| Description | Hello, I'm not very happy with Anope::string newname = "backups/" + DatabaseFile + "." + stringify(tm->tm_year) + stringify(tm->tm_mon) + stringify(tm->tm_mday); (both in modules/database/db_flatfile.cpp and modules/database/db_plain.cpp). At first, if the DatabaseFile is configured to an absolute path like database = "/var/lib/anope/anope.db" the code above will try to backup a database file to backups/var/lib/anope/anope.db.NNNN (number depends on date) which will very likely fail. Please consider using the base name of DatabaseFile only. A second thing, the filename created has a small risk for collisions. Please consider padding (preferred as this keeps backup files sorted) or insert separators between the date components. Regards, Christoph | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0006147) Adam (administrator) 2012-05-07 03:11 |
I've added the ability for the directory databases are stored in to be changed at runtime in 675b113c3e03cf1917b2a731c21fe82b5f1f2b2b by command line options. I've also added options to cmake to allow installing binaries/libs/configs/whatever in directories other than the default, if you want to use those you define one or more of BIN_DIR, DB_DIR, DOC_DOC, LIB_DIR, CONF_DIR, LOCALE_DIR, or LOGS_DIR in ./Config for cmake. |
|
(0006094) Adam (administrator) 2012-03-07 10:13 |
For now I have pushed a fix for the backup database name collision. |
|
(0006093) Adam (administrator) 2012-03-06 03:04 |
The database configuration option actually is supposed to just be a name. I'm not sure if we want to support saving and loading databases from outside of the services data directory. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-03-06 01:00 | cbiedl | New Issue | |
| 2012-03-06 03:04 | Adam | Note Added: 0006093 | |
| 2012-03-07 10:13 | Adam | Note Added: 0006094 | |
| 2012-03-07 10:14 | Adam | Status | new => acknowledged |
| 2012-05-07 03:11 | Adam | Note Added: 0006147 | |
| 2012-05-07 03:11 | Adam | Status | acknowledged => resolved |
| 2012-05-07 03:11 | Adam | Resolution | open => fixed |
| 2012-05-07 03:11 | Adam | Assigned To | => Adam |
| Copyright © 2000 - 2012 MantisBT Group |