How to exclude some file types from backup?

Murat

Verified User
Joined
Jan 3, 2017
Messages
40
Hello,
I want to exclude some file types or directories from my backups for all user accounts?
I have my weekly backup cron. It backups everything.
To make things faster and minimize, i want to exclude tar.gz, .zip, .rar and cache files from backups.

Is there a way to do this?
I read this: https://www.directadmin.com/features.php?id=1737
But it's not clear about how to specify file format to exclude globally.

Thanks.
 
Are you wanting to do this for all users at once? Is that what is meant by globally? If so, have you tried something like this?


Code:
for u in `ls  /usr/local/directadmin/data/users | grep -v httpd.conf`; do echo '*tar.gz' >> /home/$u/.backup_exclude_paths ; echo '*.zip'  >> /home/$u/.backup_exclude_paths; echo '*.rar' >> /home/$u/.backup_exclude_paths ; done


Note that I didn't include cache files as I don't what format they are in.

If you meant something else other by 'globally', please clarify.
 
Are you wanting to do this for all users at once? Is that what is meant by globally? If so, have you tried something like this?


Code:
for u in `ls  /usr/local/directadmin/data/users | grep -v httpd.conf`; do echo '*tar.gz' >> /home/$u/.backup_exclude_paths ; echo '*.zip'  >> /home/$u/.backup_exclude_paths; echo '*.rar' >> /home/$u/.backup_exclude_paths ; done


Note that I didn't include cache files as I don't what format they are in.

If you meant something else other by 'globally', please clarify.

Yes, I meant I want to exclude .rar or zip files from all backups that users created or auto-created through weekly cron.
Thank you for your help, I will try.
 
is there any way to exclude file types permanently?

i want to skip for all users/domains backups these files:

.wpress
.zip
.tar.gz
.cache
 
Back
Top