代码拉取完成,页面将自动刷新
同步操作将从 hxt168/mongodb_backup_script 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import os
import time
import properties_util
config_path=os.path.split(os.path.realpath(__file__))[0]+"/config.properties"
p=properties_util.Properties(config_path)
properties = p.getProperties()
## oss config
endpoint=properties["endpoint"]
accessKeyId=properties["accessKeyId"]
accessKeySecret=properties["accessKeySecret"]
bucket=properties["bucket"]
# oss multi upload thread num
upload_thread_num=5
## mongodb config
db_host=properties["db_host"]
db_port=int(properties["db_port"])
db_user=properties["db_user"]
db_passwd=properties["db_passwd"]
db_name=properties["db_name"]
# db backup to local temp root path
#db_backup_root_path="/tmp/"
db_backup_root_path=properties["db_backup_root_path"]
# 1: increment backup 0:full backup
is_inc_backup=int(properties["is_inc_backup"])
# if mongo_shell not in PATH , need the mongo shell absolute path
mongo_shell_path=properties["mongo_shell_path"]
### full backup config
# db backup to local temp directory name
db_backup_dir_name=r"mongodb_backup_titan_%s" %(time.strftime("%Y%m%d%H%M"))
### increment backup config
# every n day to full backup
full_backup_period=int(properties["full_backup_period"])
# db backup to local temp directory name
db_one_cycle_backup_pre_name="mongodb_cycle_backup_test_titan_"
# compress file suffix .zip or .tar.gz
compress_suffix=".tar.gz"
# is upload to oss, 1: upload to oss,delete local file 0: no upload
is_upload_to_oss=int(properties["is_upload_to_oss"])
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。