With BackupPC, if I restore to the same hardware, all is working properly.
I would like to restore to another new hardware for testing.
In BackypPC → BackupFilesExclude,
I exclude: /boot to keep the new hardware original boot /etc/fstab to keep the new hardware original disks and mounts /etc/sysconfig/network-scripts to keep the new hardware original network configuration
After a reboot of the new hardware, the files in /etc/sysconfig/network-scripts are the SOURCE ones.
Before restoration, I tried cp -a /etc/sysconfig/network-scripts /temp
Then after restoration: cp -a /temp/network-scripts/* /etc/sysconfig/network-scripts/
The SOURCE network config still show up in Cockpit → Nethwork.
QUESTION:
How to keep the new hardware original files in /etc/sysconfig/network-scripts ?
--no-reinstall : disable package reinstall during restore
--mask-unit=<name> : use systemd to mask the specified unit (example: disable httpd-admin restart during restore)
--skip-network: do not restore the network configuration
The option –skip-network is the answer, but the question is how to implement that ?
After the backup, BackupPC execute the post command $Conf{DumpPostUserCmd} → /var/lib/BackupPC/script/post-sauvegarde.sh $host
QUESTION:
Do I have to modify only: /usr/bin/ssh -l root $1 "/sbin/e-smith/signal-event post-backup-config --skip-network",
or do I have to modify a parameter somewhere in the configuration db
or in a file also somewhere,
or something else ?
BackupPC send a command to the SOURCE before taking the backup.
That way, the LDAP and other dump from sql are ready to be picked up by the backup of BackupPC.
[root@NS7 ~]# cat /var/lib/BackupPC/script/post-sauvegarde.sh
cat: /var/lib/BackupPC/script/post-sauvegarde.sh: No such file or directory
[root@NS7 ~]# ll /var/lib/BackupPC/script/
ls: cannot access /var/lib/BackupPC/script/: No such file or directory
I restore from the CLI and not from BackupPC itself. (I will have to look at restoring to another host).
I am sure that all files from the backup are all restored.
I guess it will be better to send a script with those commands to DESTINATION and then run it from DESTINATION itself.
I just have to adjust the ssh to be run from DESTINATION instead of from BackupPC…