grke / burp

burp - backup and restore program
http://burp.grke.net
Other
485 stars 77 forks source link

[RFE] allow showing include/excludes on client which are defined on the server #732

Open jirib opened 6 years ago

jirib commented 6 years ago

It would be nice if client could see final incexc list on the client itself:

# burp -t | egrep "[[:blank:]]+(cname:|include_|server_can.*include)"
                           cname: t440s-os
    server_can_override_includes: 1
                     include_ext:
                   include_regex:
                      include_fs:
                    include_glob:
# grep -v password /etc/burp/clientconfdir/t440s-os 
. incexc/openbsd-os
# cat /etc/burp/clientconfdir/incexc/openbsd-os      
# openbsd os backup, excluding user and service specific data

include=/
cross_all_filesystems=1

exclude=/tmp
exclude=/home
exclude=/data
exclude=/mnt
exclude_fs=nfs

# postgresql
exclude_regex=/var/postgresql/data/(base|global|pg_[a-di-x]|postmaster|postgresql\.audo)
# www
exclude_regex=/var/www/(htdocs|html)

exclude_comp=gz
jirib commented 6 years ago

IIUC there's no way to see 'what will be in backup' before running the backup itself. It is not also clear from docs how important is order of include/exclude lines.

grke commented 6 years ago

Hello,

The order of include/exclude lines as they appear in the config has no meaning, because burp does ordered scans of file systems and therefore re-orders the config lines internally.

'burp -t' parses the config file and tells you what is in it. If you are parsing a client config file, it does not connect to the server and run all the code that would eventually determine what the server wants the backup configuration to be.

However, you can stand on the server side and see the overridden incexcs per-client, like this:

burp -c /etc/burp/burp-server.conf -t -C testclient

Example output:

root@small:/home/graham# burp -c /etc/burp/burp-server.conf -C testclient -t | grep include
                         include: /home/graham/testdir
                     include_ext:
                   include_regex:
                      include_fs:
                    include_glob:

Also, I intend the burp -a d (diff) option to be able to tell you what will be backed up next based on the previous backup. That is not implemented yet though.

jirib commented 6 years ago

Why not to make burp -t like option to connect to server and print full settings?

grke commented 6 years ago

It is possible, but things don't just happen for free and many things compete for my attention.