diff --git a/erpnext/setup/doctype/backup_manager/backup_dropbox.py b/erpnext/setup/doctype/backup_manager/backup_dropbox.py
index c79120f..c6862d2 100644
--- a/erpnext/setup/doctype/backup_manager/backup_dropbox.py
+++ b/erpnext/setup/doctype/backup_manager/backup_dropbox.py
@@ -16,6 +16,8 @@
 from frappe.utils import get_request_site_address, cstr
 from frappe import _
 
+ignore_list = [".DS_Store"]
+
 @frappe.whitelist()
 def get_dropbox_authorize_url():
 	sess = get_dropbox_session()
@@ -35,12 +37,12 @@
 def dropbox_callback(oauth_token=None, not_approved=False):
 	from dropbox import client
 	if not not_approved:
-		if frappe.db.get_value("Backup Manager", None, "dropbox_access_key")==oauth_token:		
+		if frappe.db.get_value("Backup Manager", None, "dropbox_access_key")==oauth_token:
 			allowed = 1
 			message = "Dropbox access allowed."
 
 			sess = get_dropbox_session()
-			sess.set_request_token(frappe.db.get_value("Backup Manager", None, "dropbox_access_key"), 
+			sess.set_request_token(frappe.db.get_value("Backup Manager", None, "dropbox_access_key"),
 				frappe.db.get_value("Backup Manager", None, "dropbox_access_secret"))
 			access_token = sess.obtain_access_token()
 			frappe.db.set_value("Backup Manager", "Backup Manager", "dropbox_access_key", access_token.key)
@@ -61,10 +63,10 @@
 
 	frappe.local.message_title = "Dropbox Approval"
 	frappe.local.message = "<h3>%s</h3><p>Please close this window.</p>" % message
-	
+
 	if allowed:
 		frappe.local.message_success = True
-	
+
 	frappe.db.commit()
 	frappe.response['type'] = 'page'
 	frappe.response['page_name'] = 'message.html'
@@ -80,7 +82,7 @@
 
 	sess.set_token(frappe.db.get_value("Backup Manager", None, "dropbox_access_key"),
 		frappe.db.get_value("Backup Manager", None, "dropbox_access_secret"))
-	
+
 	dropbox_client = client.DropboxClient(sess)
 
 	# upload database
@@ -90,7 +92,7 @@
 
 	frappe.db.close()
 	response = dropbox_client.metadata("/files")
-	
+
 	# upload files to files folder
 	did_not_upload = []
 	error_log = []
@@ -98,6 +100,9 @@
 	for filename in os.listdir(path):
 		filename = cstr(filename)
 
+		if filename in ignore_list:
+			continue
+
 		found = False
 		filepath = os.path.join(path, filename)
 		for file_metadata in response["contents"]:
@@ -110,7 +115,7 @@
 			except Exception:
 				did_not_upload.append(filename)
 				error_log.append(frappe.get_traceback())
-	
+
 	frappe.connect()
 	return did_not_upload, list(set(error_log))
 
@@ -119,7 +124,7 @@
 		from dropbox import session
 	except:
 		frappe.msgprint(_("Please install dropbox python module"), raise_exception=1)
-	
+
 	if not (frappe.conf.dropbox_access_key or frappe.conf.dropbox_secret_key):
 		frappe.throw(_("Please set Dropbox access keys in your site config"))
 
@@ -129,11 +134,11 @@
 def upload_file_to_dropbox(filename, folder, dropbox_client):
 	from dropbox import rest
 	size = os.stat(filename).st_size
-	
+
 	with open(filename, 'r') as f:
 		# if max packet size reached, use chunked uploader
 		max_packet_size = 4194304
-	
+
 		if size > max_packet_size:
 			uploader = dropbox_client.get_chunked_uploader(f, size)
 			while uploader.offset < size:
@@ -146,4 +151,4 @@
 			dropbox_client.put_file(folder + "/" + os.path.basename(filename), f, overwrite=True)
 
 if __name__=="__main__":
-	backup_to_dropbox()
\ No newline at end of file
+	backup_to_dropbox()
