def task_dump(self, localfile, withAttachments=True): """ Create a tarball containing all information not currently stored in version control and download it to the given C{localfile}. C{localfile} is a path on your local system. Keep it in sync with task_restore. For it to work you need your SSH public key added to /srv/trac/.ssh/authorized_keys """ with settings(user=self.serviceUser): with utils.tempfile() as temp: postgres.dumpToPath('trac', temp) files = { 'db.dump': temp, } if withAttachments is True: #files['attachments'] = 'attachments' files['trac-attachments'] = 'config/trac-env/files/attachments' archive.dump(files, localfile)
def task_dump(self, localfile): """ Create a tarball containing all information not currently stored in version control and download it to the given C{localfile}. """ with settings(user=self.serviceUser): with utils.tempfile() as temp: postgres.dumpToPath('trac', temp) archive.dump({ 'htpasswd': 'config/htpasswd', 'attachments': 'attachments', 'db.dump': temp, }, localfile)
def task_dump(self, localfile, withAttachments=True): """ Create a tarball containing all information not currently stored in version control and download it to the given C{localfile}. """ with settings(user=self.serviceUser): with utils.tempfile() as temp: postgres.dumpToPath('trac', temp) files = { 'db.dump': temp, } if withAttachments is True: files['attachments'] = 'attachments' archive.dump(files, localfile)