This is an awesome module, and I'll definitely be using for its intended purpose.
It will be brilliant for helping a bunch of technophobic teachers practice using
the school website without destroying anything! Thanks for your great work.

But I wanted to explore another usage....

You see, I feel there is a need for people like myself to be able to press one button
and get a manual 'snapshot' of their database *and* files for backup purposes
as they develop.

The way the 'Demo Site' module handles the database snapshots is wonderful -
especially the info file, stating the modules installed and a description. I was wondering
if this module could be modified and released as a backup tool? Could it be modified to
tarball the drupal installation, and move it into the directory where the sql snapshots
are placed?

If you really wanted to go to town with it, it woud be awesome to have an automated
backup scheduler option too, with a limitation set on the number of snapshots kept.

I just wondered whether you guys had thought of this usage, since this module is
half-way there already, and Drupal does not have any file backup modules?

Cheers.

CommentFileSizeAuthor
#5 demo.patch15.58 KBevoltech

Comments

sun’s picture

Title: demo as a 'backup' tool » Add backup of files to snapshot
Component: Miscellaneous » Code

That's definitely worth considering. We're heavily using Demo to create and transfer snapshots during development of Drupal sites (aka. staging). However, since we're using other methods to backup sites (usually shell script-driven), I don't think that I'll implement this feature by myself - of course, I'd be happy to review and test patches.

Some things to consider:

- It should be configurable which files to backup (complete filesystem, files/*, sites/*), so users can leave out Drupal core for example.
- This feature should take #132240: Remove added files since last snapshot into account.

luco’s picture

the backup module (www.drupal.org/project/backup) does that, but lacks D6 porting.

perhaps you could have a nice chat with that module's maintainer ;]

cheers,
Luciano

evoltech’s picture

It looks like the backup_migrate module does this and includes support for compressing the sql file as requested in #474414: Compress the .sql file. There is built in support for three different file compressions depending on what is available in the server environment as well. It seems that while backup_migrate module has support for automatic backups, it does not have support for automatic restores like demo does. There is a 6.x version and looks like there it is going to be developed / maintained through 7.x.

sun’s picture

Sure, backup_migrate module exists. But that does not mean users of Demo module are using it. Also, if you look at http://drupal.org/project/demo, then you'll notice that Demo module already exists for D7.

evoltech’s picture

StatusFileSize
new15.58 KB

It looks like our team won't be moving forward with demo for this, but since I already did the bulk of work for adding this feature as well as #474414: Compress the .sql file I though I would at least include the partially completed work here. This created on the DRUPAL-6--1-1 branch. The only remaining work is for restoring files from the compressed archive.

FYI the work in backup_migrate offfers some examples at a few ways to improve on this work (extending to other compression types instead of just zip).

Wolfgang Reszel’s picture

Any chances to get this for D7?

sun’s picture

Version: 6.x-1.1 » 7.x-1.x-dev

Yes, this is an absolute requirement for 8.x either way (due to the new file-based configuration in D8).

tsvenson’s picture

Yes, being able to snapshot/restore the files in D7 would be very useful. Both for experimental use and demo sites where files are used.

Thinking maybe using demo/subfolder for each snapshot could be a rather easy, yet flexible way of doing this.

Creating a snapshot:

  • Demo creates a subfolder with the snapshot name in the demo folder
  • That folder contain the current files plus folders for public and private and copies the content there

Restoring a snapshot:

  • Demo deletes the current public and private (except the private/demo of course and copies the snapshot files there
  • Restores the sql

This way it will be incredible easy to reset a snapshot to its original state with files and all. Plus of course the same for publicly demo sites that utilizes files and/or allow demo users to upload and manipulate files.

izmeez’s picture

Issue summary: View changes

I'm not sure I understand the value of this. If one is switching snapshots back and forth is the concern that the files may be modified? Won't the new files have different names? Can't they just be left and used when the snapshot requires?

gaurav.kapoor’s picture

The current patch doesn't work. Working on D7 as well as D8 functionality.

gaurav.kapoor’s picture

Assigned: Unassigned » gaurav.kapoor
gaurav.kapoor’s picture

Status: Active » Closed (won't fix)