I've seen issues indicating that Backup and Migrate structures backup profiles as CTools exportables. This means that you should be able to create a Feature including a backup profile, right?

However, when I go to admin/build/features/create, I do not see anything related to CTools or Backup Migrate in the "Edit Components" select box. For that matter, I also don't see any export options at admin/content/backup_migrate/profile. Am I missing something here?

I'm using CTools 1.7, Backup Migrate 2.4, and Features 1.0

Comments

szantog’s picture

Title: How to export backup profiles through Features? » Export backup profiles and schedules through Features
Version: 6.x-2.4 » 6.x-2.x-dev
Category: support » feature

As I see, it's not possible now. I try to make it, if I will have time, because this would be useful feature for me too.

danepowell’s picture

I switched to Aegir so I no longer use Backup Migrate directly, so I'm not really interested in this feature any longer. But at any rate, it seems like this functionality might already exist: #373786: Add option to store backup profiles in code

From that thread, it sounds like all you have to do is have cTools enabled?

deciphered’s picture

#373786: Add option to store backup profiles in code

The above issue states that the functionality exists, but I can't find any evidence of the functionality. Was it removed maybe?

Shouldn't be too hard to add the functionality back in, but it would be interesting to know the story behind this.

Shai’s picture

I'm also interested in this. No export links show up and I have cTools enables.

jgraham’s picture

Chiming in to confirm this issue. The functionality is partially present. I am not seeing any UI to expose the links.

For example the following links result in the form with the ctools exportable code;

  • /admin/content/backup_migrate/profile/list/export/PROFILE-ID
  • /admin/content/backup_migrate/schedule/list/export/SCHEDULE-ID

You can just click on edit for a backup_migrate 'entity' (profile/schedule) and change 'edit' to 'export' for the same result.

However it would be great if you could build a feature through the GUI as provided by the features module.

damienmckenna’s picture

Subscribe.

jdleonard’s picture

sub

patcon’s picture

Anyone wondering about those hidden path should check at the equivalent of this for D7:

admin/config/system/backup_migrate/profile/list/export/PROFILE_ID

Ex: admin/config/system/backup_migrate/profile/list/export/default

Wolfgang Reszel’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Component: User interface » Code

It would be nice if someone could create a "features.inc" file at least for the D7 version.

RobW’s picture

You can find the schedules the same way as #8:

../admin/config/system/backup_migrate/schedule/list/export/[schedule ID]

Features support would be great, or any way to import these exportables.

mile23’s picture

How to use the exported array? Clues in this issue: #373786: Add option to store backup profiles in code.

+1 on Features integration.

traviscarden’s picture

Title: Export backup profiles and schedules through Features » Make backup profiles and schedules Features exportable
Issue tags: +Features integration

Marked #373786: Add option to store backup profiles in code as a duplicate. (The solution there no longer reflects the current state of the data structure.)

john bickar’s picture

Example implementation of the export code found at admin/config/system/backup_migrate/profile/list/export/PROFILE_ID:

/*
 * Implements hook_backup_migrate_profiles().
 */
function mymodule_backup_migrate_profiles(&$profiles) {

  $out = array();
  $out['my_profile'] = backup_migrate_crud_create_item('profile',

// paste exported code here, starting with "array("

  );
  
  return $out;

Working example code here.

ronan’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Active » Fixed

This is possible in the 3.x branch.

Status: Fixed » Closed (fixed)
Issue tags: -Features integration

Automatically closed -- issue fixed for 2 weeks with no activity.

BarisW’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

Should this work now? I am able to export my configurations, but they don't end up on the other environments. Reverting the features doesn't seem to create the schedules? The custom destinations seem to work, but the schedules don't.

akalata’s picture

This is the in-code solution for 7.x-2.x (in case someone can't upgrade to 7.x-3.x): #1820530: Document the ability to enable/disable backup scheduling in settings.php

  • Commit 989630f on 7.x-3.x by ronan:
    #1001654 Fixed ctools exportables
    
ronan’s picture

Status: Active » Fixed

The latest dev should fix the issues with ctools and features.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.