Option to exclude files/folders from backup
ahoeben - March 22, 2007 - 10:41
| Project: | backup |
| Version: | 5.x-4.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
Attached patch gives the user the option to exclude a top-level file/folder from the tarball.
| Attachment | Size |
|---|---|
| backup-exclude.patch | 1.83 KB |

#1
Thanks for the patch.
Before I implement it, I'm a bit unsure as to *why* we would want to exclude a specific folder from the backup. Can you elaborate on a use case?
Thanks,
-- Doug
#2
Say for example you have a large temp-folder on your website you use to drop files for people to download, which has nothing to do with your Drupal installation. Or there's a whole subsite in the Drupal 'root' folder that has nothing to do with Drupal. I can also see this being useful if you just want to do a quick backup of the Drupal installation and db, but don't want to/need to include the full 'files' folder with - say - 8 Gb of video data (again).
#3
+1
#4
I second ahoeben's comment.
For example, I have one website on the root of its domain and I have some other directories which are temporary sites for my clients to see. When I'm done, I'll delete them and they're also just copies of the original sites, so I don't really want to have them in a backup of my site.
Add my vote to this patch :)
#5
Hi,
I am a relative drupal newbie, so please forgive what might seem like a basic question: how do I install the patch to exclude files/folders from backup. This is very important to me as I upload large files into a files/download directory for download by site users and I do not want to include them in the site backups.
Thanks in advance for your help ....
#6
I am using 5.x-4.x-dev and do not believe the patch works any longer. I am also using drupal 5.2. I noticed that the recent releases of the backup module have this note: "- Implemented a new mechanism for excluding files in a backup directory, courtesy of a suggestion from guenneguez_t." What is the new mechanism? Are there plans to incorporate a file/folder exclusion option in the module interface?
#7
Would really love this to be implemented!
#8
I tried your patch - it works with a few changes:
- I used functions.inc.php instead of backup_lib.php, cause in my version backup_lib.php is not included
- I added $exclude = preg_split("/[\s,]+/", strip_tags(variable_get("backup_exclude", '')));
in backup_get_files(&$file_list, $prefix_dir) {
before while ($file = readdir($fp)) {
cause $exclude is not defined
#9
subscribing
#10
I would really like to see this feature in the next release too.
#11
[sorry, please delete]
#12
+1