Hi everybody,
for hours now I try to achieve a - for me - simple backup use case using .pxarexclude:
-> Backup just one or two selected, named folders and all its subfolders, ignore every other.
Assume this tree:
Here simply "backupme" and "backupmetoo" should be backed up including all files and subfolders, every other folder should be excluded without explicitly naming it. So the resulting backup should be:
Following this doc: https://pbs.proxmox.com/docs/backup-client.html#excluding-files-directories-from-a-backup I tried this with a .pxarexclude in /opt/backuptest.
The first try was:
But this backed up just empty folders:
Next try:
leads to nothing be backed up:
Another one:
Now only files in the first level, but no subfolders are backed up:
Now with this:
Again, nothing backed up except .pxarexclude itself:
I tried much more different combinations of globs, trailing slashes a.s.o. in the exclude and include lines but never found a working solution.
Any hints how to write the correct .pxarexclude for achieving this simple use case?
It would be so much simpler if it would be possible to have some sort of ".pxarinclude", just listing files/folders which should be included in the backup, ignoring everything else.
Thx in advance!
T0mc@
for hours now I try to achieve a - for me - simple backup use case using .pxarexclude:
-> Backup just one or two selected, named folders and all its subfolders, ignore every other.
Assume this tree:
Code:
/opt/backuptest# tree
.
├── backupme
│ └── file0
├── backupmetoo
│ ├── file0
│ ├── subfolder0
│ │ └── file0
│ └── subfolder1
├── notme1
│ └── file0
├── notme2
│ ├── file0
│ └── subfolder0
├── notme3
│ └── file0
├── notme4
│ └── file0
├── notme5
│ └── file0
├── notme6
│ └── file0
├── notme7
│ └── file0
├── notme8
│ └── file0
└── notme9
└── file0
Here simply "backupme" and "backupmetoo" should be backed up including all files and subfolders, every other folder should be excluded without explicitly naming it. So the resulting backup should be:
Code:
├── backupme
│ └── file0
├── backupmetoo
│ ├── file0
│ ├── subfolder0
│ │ └── file0
│ └── subfolder1
Following this doc: https://pbs.proxmox.com/docs/backup-client.html#excluding-files-directories-from-a-backup I tried this with a .pxarexclude in /opt/backuptest.
The first try was:
Code:
*
!backupme
!backupmetoo
But this backed up just empty folders:
Next try:
Code:
*
!backupme/*
!backupmetoo/*
leads to nothing be backed up:
Another one:
Code:
*/
!backupme
!backupmetoo
Now only files in the first level, but no subfolders are backed up:
Now with this:
Code:
*/
!backupme/**/*
!backupmetoo/**/*
Again, nothing backed up except .pxarexclude itself:
I tried much more different combinations of globs, trailing slashes a.s.o. in the exclude and include lines but never found a working solution.
Any hints how to write the correct .pxarexclude for achieving this simple use case?
It would be so much simpler if it would be possible to have some sort of ".pxarinclude", just listing files/folders which should be included in the backup, ignoring everything else.
Thx in advance!
T0mc@