Skip to main content

pkgacct backup trick to obey cpbackup-exclude.conf no longer works

Comments

6 comments

  • Infopro
    This documentation is incorrect, is that right? How to Exclude Files from Backups - cPanel Documentation
    0
  • aww
    There have been several threads about cpbackup-exclude.conf before I had working cpbackup-exclude.conf and it was being obeyed But since the changeover to the newer perl I believe everything stopped working As a test I have directory /directory directory/ */directory directory/* None of them work, none of them are being obeyed anymore CENTOS 6.5 x86_64 WHM 11.42.0 (build 5) Oh and looking at the /scripts/pkgacct it would be incredibly easy for cpanel to add a --nologs option, you already have a conditional wrapper on the logs portion. But the logs are the least of my problems.
    0
  • aww
    Okay it looks like /scripts/pkgacct had a major rewrite over the years. This line breaks things $_ = $homedir . '/' . $_ if ( index( $_, '/' ) != 0 ); It tampers with the rules in a way that breaks them. If I comment it out, pkgacct obeys the rules. Note I am backing up to a directory outside of $homedir (as root) so it is possible the exclusion process runs after the files are copied and not before and since they are not in $homedir, they are never obeyed.
    0
  • Infopro
    So, the customized way that you're doing the backup sounds like it needs to be updated for whatever reason to work with the latest version of cPanel, is that right? Why is this so much of a showstopper that you'd state this? [QUOTE] Is there any way to make this work again or is it time to move on from cpanel?
    0
  • aww
    What I am saying is this: at some point in the past year, cpanel significantly changed/rewrote pkgacct it no longer obeys cpbackup-exclude.conf because of a bug, which is a major problem for large sites and it still does not have any way to exclude logs, even though that would be super easy to do in the code to add an option Fortunately I know enough to be able to manually patch pkgacct myself but I had to waste an hour or so on it when we've been paying for multiple cpanel licenses for years and it should not be necessary to patch things by hand. I think others that rely on cpanel are going to surprised to see pkgacct no longer obeying exclusions. Steps to reproduce 1. Create a dummy file in a dummy directory under a dummy user ie. /home/test/public_html/testing/abc.txt 2. Edit the /home/test/cpbackup-exclude.conf and try to insert rules to exclude abc.txt or the testing directory entirely 3. Move outside the /home/test directory, say for example /backup 4. Backup using /scripts/pkgacct test /backup/ backup (the last "backup" on that line is to trigger the cpbackup mode instead of the cpmove mode and the file name will be simple) 5. unpack the /backup/test.tar.gz file and then notice despite your rules, /testing/abc.txt is still in there For the record, this method worked for years. It broke sometime in the past year. If finding the date is critical, we keep backup logs so I could go through it month by month to find when backups started to bloat.
    0
  • Infopro
    [QUOTE] at some point in the past year, cpanel significantly changed/rewrote pkgacct
    I can't speak to this directly, but cPanel has added an entirely new backup system. I would think that script was a part of that. I am unable to duplicate the issue, when excluding a directory. It works fine for me here. I have a directory with 450MB of files in it, I ran my backup and checked size. Killed that backup and added the directory to cpbackup-exclude.conf and then ran backup again. That directory was skipped as expected. I'm using the new backup system, not legacy. I did not attempt to do this again with a file name excluded, or file type.
    0

Please sign in to leave a comment.