From d166a0951146ca203a2d5e8919c2511299a171a5 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Fri, 10 Sep 2021 02:12:21 +0300 Subject: [PATCH] fix(backup): backup certs [EE-1479] (#5469) * fix(backup): backup certs * fix(backup): sort files to backup --- api/backup/backup.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/api/backup/backup.go b/api/backup/backup.go index 0a62786f5..8470f837f 100644 --- a/api/backup/backup.go +++ b/api/backup/backup.go @@ -16,7 +16,18 @@ import ( const rwxr__r__ os.FileMode = 0744 -var filesToBackup = []string{"compose", "config.json", "custom_templates", "edge_jobs", "edge_stacks", "extensions", "portainer.key", "portainer.pub", "tls"} +var filesToBackup = []string{ + "certs", + "compose", + "config.json", + "custom_templates", + "edge_jobs", + "edge_stacks", + "extensions", + "portainer.key", + "portainer.pub", + "tls", +} // Creates a tar.gz system archive and encrypts it if password is not empty. Returns a path to the archive file. func CreateBackupArchive(password string, gate *offlinegate.OfflineGate, datastore portainer.DataStore, filestorePath string) (string, error) {