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
Description

Attached patch gives the user the option to exclude a top-level file/folder from the tarball.

AttachmentSize
backup-exclude.patch1.83 KB

#1

dmuth - March 28, 2007 - 03:13
Version:5.x-1.x-dev» 5.x-2.x-dev

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

ahoeben - March 29, 2007 - 07:00

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

diegogers - March 29, 2007 - 14:33

+1

#4

borfast - May 7, 2007 - 20:59

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

rtivel - September 13, 2007 - 22:14
Version:5.x-2.x-dev» 5.x-4.x-dev

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

rtivel - September 14, 2007 - 04:13

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

DawnLight - September 14, 2007 - 07:53

Would really love this to be implemented!

#8

Petra - September 26, 2007 - 12:39

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

okeedoak - November 12, 2007 - 07:16

subscribing

#10

tj2653 - December 22, 2007 - 06:33

I would really like to see this feature in the next release too.

#11

tj2653 - February 9, 2008 - 00:28

[sorry, please delete]

#12

Dimm - February 28, 2008 - 17:39

+1

 
 

Drupal is a registered trademark of Dries Buytaert.