It("does not clear the data directory", func() {
				dataFilePath := filepath.Join(repo.InstanceDataDir(instance.ID), "appendonly.aof")

				originalDataFileContents := []byte("DATA FILE")
				err := ioutil.WriteFile(dataFilePath, originalDataFileContents, 0755)
				Ω(err).NotTo(HaveOccurred())

				writeInstance(instance, repo)

				dataFileContents, err := ioutil.ReadFile(dataFilePath)
				Ω(err).NotTo(HaveOccurred())
				Ω(dataFileContents).Should(Equal(originalDataFileContents))
			})

			It("does not clear the log directory", func() {
				logFilePath := filepath.Join(repo.InstanceLogDir(instance.ID), "redis-server.log")

				originalLogFileContents := []byte("LOG FILE")
				err := ioutil.WriteFile(logFilePath, originalLogFileContents, 0755)
				Ω(err).NotTo(HaveOccurred())

				writeInstance(instance, repo)

				logFileContents, err := ioutil.ReadFile(logFilePath)
				Ω(err).NotTo(HaveOccurred())
				Ω(logFileContents).Should(Equal(originalLogFileContents))
			})

			Context("when there is no log directory", func() {
				BeforeEach(func() {
					err := os.RemoveAll(repo.InstanceLogDir(instance.ID))
			It("does not clear the data directory", func() {
				dataFilePath := filepath.Join(repo.InstanceDataDir(instance.ID), "appendonly.aof")

				originalDataFileContents := []byte("DATA FILE")
				err := ioutil.WriteFile(dataFilePath, originalDataFileContents, 0755)
				Ω(err).NotTo(HaveOccurred())

				writeInstance(instance, repo)

				dataFileContents, err := ioutil.ReadFile(dataFilePath)
				Ω(err).NotTo(HaveOccurred())
				Ω(dataFileContents).Should(Equal(originalDataFileContents))
			})

			It("does not clear the log directory", func() {
				logFilePath := filepath.Join(repo.InstanceLogDir(instance.ID), "redis-server.log")

				originalLogFileContents := []byte("LOG FILE")
				err := ioutil.WriteFile(logFilePath, originalLogFileContents, 0755)
				Ω(err).NotTo(HaveOccurred())

				writeInstance(instance, repo)

				logFileContents, err := ioutil.ReadFile(logFilePath)
				Ω(err).NotTo(HaveOccurred())
				Ω(logFileContents).Should(Equal(originalLogFileContents))
			})

			Context("when there is no log directory", func() {
				BeforeEach(func() {
					err := os.RemoveAll(repo.InstanceLogDir(instance.ID))