-
Notifications
You must be signed in to change notification settings - Fork 0
bigxu/rsync-bak
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
目前 备份就是用 的 这个脚本 --------- bash shell分析 ini配置 文 件 rsync自 动备份文件 ---------初 始 化 : 1, 设置crontab 2,安 装 lzop --------- # m h dom mon dow command 0 0 * * * (/usr/sbin/ntpdate 133.100.9.2) > /dev/null 2>&1 0 0 * * * /home/bigxu/workspace/setup-config/dmesg-check/check.sh > /dev/null 2>&1 0 1 * * * /home/bigxu/workspace/setup-config/bak-to-d5/bak.sh > /home/bigxu/tmp/bak.log 2>&1 #*/30 * * * * /usr/local/bin/php /home/bigxu/workspace/setup-config/bak-rsync/monitor > /dev/null 2>&1 --------注意 事 项: .ssh/config文 件 区分 认证证书类型,并备份了rsa文 件 ,在 该目录呢。 -------------写 这个备份脚 本有 三 个目的 1,干 净完全的 备份,不要 丢东落西的 2,最小 牺牲生 产机的 性能 3, 简易的 配置 ,希望 是 一 劳永逸 。只 改 写 配置 文 件 就行了 。 ------------- 执行远程脚本 ssh_command 远程服 务器的 脚本 如,ssh_command=/home/bigxu/workspace/setup-config/fragment/d6-bak-gitlab.sh gitlab的 官 方 备份/恢复有 点 麻 烦,执行此命令 会 暂这一 下 gitlab docker,备份数 据 目 录。然 后 同 步 到 备份机上 来 。 ------------- mysql导出 mysql 导出在 当 前 的 dir中 .不 必考虑删除 昨 天 的 ,重 名 之 类的事 ,已 经完全 处理了 。 现在mysql导出极为方便 了 .可 以指定 任 何 参 数 ,当然 也可以指定 某 个库了 mysql_dump_command=/usr/local/bin/mysqldump56 -uroot -ppassword --all-databases -------------同 步 目 录 dir,要 同 步 的 目 录 bak_day, 备份保留 多久 bak_freq,隔 几天备份一 次 exclude=--exclude "mysql/data" --exclude "xx"排除 目 录 ; [xx 标题陈述 ] ; server,port,dir 显而易 见 ; mysql_dump_command mysql爱怎么导就怎么了,可 以指定 要 导的数 据 库表... ; bak_days 备份保留 的 天 数 ; bak_freq 备份隔几天备一 次 [d6:gitlab] server=d6.bigxu.com port=222 ssh_command=/home/bigxu/workspace/setup-config/fragment/d6-bak-gitlab.sh dir=/data/backup/gitlab [d6:nginx-conf] server=d6.bigxu.com port=222 dir=/home/soft/nginx/conf bak_days=40 bak_freq=1 [d8:xunsearch] server=d8.bigxu.com port=222 dir=/data/www/xunsearch mysql_dump_command=/usr/local/bin/mysqldump56 -uroot -ppassword --all-databases bak_days=40
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published