Koozali.org: home of the SME Server
Obsolete Releases => SME Server 9.x => Topic started by: michelandre on June 16, 2018, 03:43:34 AM
-
Hi all,
I want to include the file: var/lib/pgsql/10/data/pg_hba.conf into the standard backup.
mkdir -p /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf
chmod 600 /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf
cat > /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf/41go-into <<'EOT'
--go-into opt
--go-into var/lib/pgsql/sauvegarde
--include var/lib/pgsql/10/data/pg_hba.conf
EOT
expand-template /etc/dar/DailyBackup.dcf
/sbin/e-smith/do_backupwk
In Server Manager, in restore file...
- I can see directories /opt and /var/lib/pgsql/sauvegarde but not the file /var/lib/pgsql/10/data/pg_hba.conf.
- I can restore all the contents of the directories.
- I can not restore the file /var/lib/pgsql/10/data/pg_hba.conf as it is not in the backup.
In: https://wiki.contribs.org/Backup_with_dar
--include path/to/file/sampleFileName.txt
--include "*.backMeUp"
--include "*pg_hba.conf" doesn't work either.
If I only insert --include var/lib/pgsql/10/data/pg_hba.conf, the full backup stops at 299KB.
Full backup with only the directories /opt and /var/lib/pgsql/sauvegarde included, the backup files are:
full-20180615195352.1.dar = 716800Kb
full-20180615195352.2.dar = 275897Kb
Any help appreciated,
Michel-André
-
In /etc/e-smith/templates/etc/dar/DailyBackup.dcf, there are:
40go-into (some code inside)
50exclude (empty)
Maybe it needs also fragments:
include
prune
Michel-André
-
michelandre
Despite what the wiki says about --include, try
--go-into var/lib/pgsql/10/data/pg_hba.conf
That style is what is used in a custom template I have.
I cannot check at the moment if that is actually working (backing up the file), but it appears to be derived from original sme server code (ie a different filename of course), as it has been there a long time.
-
Or you can try another way: templatize you conf file and you're done
-
Hi Janet,
Thank you for for reply - it works.
Should I report a "bug" in the documentation for: https://wiki.contribs.org/Backup_with_dar?
Michel-André
-
michelandre
Yes, but it might be code or documentation.
Should I report a "bug" in the documentation