Creating a backup of a specific folder

NethServer 7.7.1908

I would like to setup one backup, among others, that only backs-up one specify directory.

I have named the configuration ‘aws’ and created an empty file ‘aws.exclude’ as well as a file ‘aws.include’ that contains, on one line, the path of the one folder to be backed up.

However, for some reason, a full backup is being performed, of, it seems to me, the sum of all folder specified in the other *.include files.

Going through the Server Manager does not allow me to gain more control or insight.

Thanks for any tips and suggestions!

Currently, Server Manager and/or Cockpit won’t give to admin more control or insight on what you are going to backup. Backup for NethServer is considered the backup of the whole server, at least as far as i know. This should be the base-concept.

I don’t know if the backup system (and underlying engines) is usable in any for create a custom setup into a script, but i don’t think that a separate backup of a single folder it will be managed via WebGUI in any way.

Did you take a read on this documentation page?
https://docs.nethserver.org/projects/nethserver-devel/en/latest/nethserver-backup-data.html

Hi Michael - thanks so much for your response.

I did read the documentation and based my approach on the following:
https://docs.nethserver.org/en/v7/backup_customization.html#example

But maybe this functionality is no longer applicable…?

This section of the documentation is still actual and I’ve used it successfully to create a backup like the one you’re trying to configure.
To help you, please show the content of the include/exclude files and the output of db backups show.

1 Like

Hello Filippo, thank you for replying and confirming that this is indeed a feasible backup scenario.

Before I send you settings for review, could you please tell me how to completely delete and remove a backup configuration? I have several backups setup and would like to first reduce the problem to a minimum to simplify the debugging. Thanks!

Start with include/exclude files… let’s see if they can be correctly validated by the backup-data command

Here is the contents of my include/exclude files:

[root@homeserver backup-data.d]# ls
aws.exclude     nethserver-backup-data.exclude  nethserver-collectd.include
aws.include     nethserver-backup-data.include  nethserver-openvpn.exclude
custom.exclude  nethserver-base.exclude         nextcloud.include
custom.include  nethserver-base.include
[root@homeserver backup-data.d]# more aws.exclude
[root@homeserver backup-data.d]# more aws.include
/var/lib/nethserver/ibay/parents
[root@homeserver backup-data.d]# more custom.exclude
[root@homeserver backup-data.d]# more custom.include
[root@homeserver backup-data.d]# more nethserver-backup-data.exclude
/var/lib/nethserver/backup/restic/
/var/lib/nethserver/backup/duplicity/
/var/lib/nethserver/db
/root/.ssh
/var/log/lastlog
[root@homeserver backup-data.d]# more nethserver-backup-data.include
[root@homeserver backup-data.d]# more nethserver-base.exclude
/var/lib/nethserver/secrets
[root@homeserver backup-data.d]# more nethserver-base.include
/root
/var/lib/nethserver
[root@homeserver backup-data.d]# more nethserver-collectd.include
/var/lib/collectd
[root@homeserver backup-data.d]# more nethserver-openvpn.exclude
/var/lib/nethserver/certs
[root@homeserver backup-data.d]# more nextcloud.include
/usr/share/nextcloud/config/config.php

Did you try to start the backup from command line or from new server manager? In the classic server manager you cannot control custom data backups.

backup-data -b aws

Yes, this is the command that I am using.

Would you happen to know how to cleanly and completely remove all backup configurations so that I can start from scratch?

Added custom include/exclude files need to be manually removed.
You may remove the backups in new server manager or by deleting them from backups database with

db backups delete <BACKUPNAME>