Add backup of files to snapshot
| Project: | Demonstration site (Sandbox / Snapshot) |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
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.

#1
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.
#2
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
#3
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.
#4
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.
#5
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).