I propose to add some additional text fields to dump setting form in admin/build/demo page to specify the default dump file name and time format to be appended along dump file (if any). The file name will be used when creating new dump. This makes it easier to create dump quickly especially when you have devel pager and memory usage printing turned on.

Attached patch will do the needful. Please review it and let me know if there are any changes.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Thanks!

  1. Shouldn't we rely on Token module for this kind of functionality? (string templates/replacements)
  2. The defines are not needed; a variable should be sufficient.
  3. Using "snapshot" as name for a snapshot is quite superfluous info... ;) Tinkered about useful values and formats a bit and I think that
    [database-name]-[date:Y-m-d-Hi]
    

    would make most sense - even more if you're hopping between staging and dev servers and the like. We'd likely have to implement a non-public global token for [database-name].

  4. Off-topic for this issue, but still wanted to mention that there's another issue in the queue that wants to add a checkbox "Create snapshot" to certain forms (modules page, themes page, update.php), for which this fundamental snapshot filename template support could be re-used (to some extent):
    pre-modules-[module-list]   (=> pre-modules-foo-bar-weird_module)
    pre-themes-[theme-list]     (=> pre-themes-fusion)
    pre-update-[date:Y-m-d-Hi]
    
gaurav.kapoor’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Not working on D6 anymore.