How to exclude specific files/directories from a backup?




  • Avatar
    Marco Marsala (Edited )



    Too, the trailing wildcard is mandatory?

  • Avatar
    Andrey Ivanov

    Hello Marco,

    Please use relative paths only (means that values should not begin with "/"). As for asterisk symbol, it is mandatory if you want to exclude all files in a specific directory, otherwise, it will not work without *.

  • Avatar
    Marco Marsala

    So, please correct the description of option "Exclude specific files from the backup" in Plesk UI because it says to use the leading slash:

    "You can only exclude files within webspaces. Specify the path or paths relative to the webspace root, separating individual files with commas. Using the mask symbol is allowed (e.g. /somedir/log*)."

  • Avatar
    Nikolay Zhmuk (Edited )

    @Marco Marsala I double checked it on my test and it works in both ways: with leading slash and without it. Relative path should be specified inside webspace directory(e.g. /var/www/ For example, there is some subdirectory like /var/www/example/subdir/ and it is required to exclude the files inside of this subdirectory, the path you have to specify during backup creation is /subdir/* (or subdir/*) 

    The article has been update with additional details.

Please sign in to leave a comment.