def _archive(self):
        """
        Performs an archive action on the todolist.

        This means that all completed tasks are moved to the archive file
        (defaults to done.txt).
        """
        archive, archive_file = _retrieve_archive()

        if self.backup:
            self.backup.add_archive(archive)

        if archive:
            from topydo.commands.ArchiveCommand import ArchiveCommand
            command = ArchiveCommand(self.todolist, archive)
            command.execute()

            if archive.dirty:
                archive_file.write(archive.print_todos())
Performs an archive action on the todolist.

        This means that all completed tasks are moved to the archive file
        (defaults to done.txt).