Exemplo n.º 1
0
        public virtual string CreateBackupZip()
        {
            var dbFile     = _environmentProvider.GetNzbDroneDbFile();
            var configFile = _environmentProvider.GetConfigPath();
            var zipFile    = _environmentProvider.GetConfigBackupFile();

            using (var zip = new ZipFile())
            {
                zip.AddFile(dbFile, String.Empty);
                zip.AddFile(configFile, String.Empty);
                zip.Save(zipFile);
            }

            return(zipFile);
        }