0

i am tring to configure BackupPc to EXCLUDE some directories on my backups.

I need to exclude many (very big) caches directories from backups on different machines

can you help me?

this is my configuration but doen't work, navigationg on the backups i always have /wp-content/cache/ directory filled of GB of files

$Conf{BackupFilesExclude} = {
  '*' => [
    '/*/wp-content/cache/',
    '/wp-content/cache/*',
    './wp-content/cache/',
    'wp-content/cache/',
    'wp-content/cache/*'
  ]
};

i tried many values on $Conf{BackupFilesExclude} without success

thanks

Augusto Murri
  • 29
  • 1
  • 2
  • 10

2 Answers2

0

This is an example configuration I used:

$Conf{BackupFilesExclude} = {
 '/var' => [ '.Trash*', '/cache', '/lock', '/spool/exim4', '/run', '/tmp' ],
 '*' => [ '.cache', '.gvfs', '.thumbnails', '.Trash*', 'Cache', 'Dropbox' ]
};

This ignores all the /cache directory under /var. Directories named .cache or Cache are also ignored. I am not sure you can use wildcards when listing directories.

If you have multiple workpress caches under /opt you may want to try /opt/* => [ '/wp-content/cache' ]. Adjust to your needs.

BillThor
  • 27,354
  • 3
  • 35
  • 69
0

Assuming you are using the 'tar' method, all you need is something like this:

$Conf{BackupFilesExclude} = {
    '*' => [
        'wp-content/cache'
    ]
};

You should not include a trailing slash, or tar will ignore it. And you only want to include the preceding slash if it is directly at the root of the "share" or folder being backed up.

If the 'wp-content/cache' folder is at the root of the share, it could also look like so:

$Conf{BackupFilesExclude} = {
    '*' => [
        '/wp-content/cache'
    ]
};

Wildcards are only needed for matching partial folder/file names.