现在有两台服务器,之前用linux做svn服务器,现在需要在windows服务器上做备份!有什么方法在windows执行脚本或者其他操作能直接将linux的svn直接备份到windows上,减少对linux的操作!
2条回答 默认 最新
流比 2023-01-30 17:58关注你可以在 Linux 系统上执行脚本,定期备份 SVN 代码库,并将备份文件通过网络传输到 Windows 系统上。
#!/bin/bash # The location of the SVN repository SVN_REPO="/path/to/svn/repo" # The location to store the backup BACKUP_DIR="/path/to/backup/dir" # The current date and time DATE=`date +%Y%m%d-%H%M` # The filename of the backup BACKUP_FILE="$BACKUP_DIR/svn_repo_$DATE.bak" # Dump the SVN repository svnadmin dump $SVN_REPO > $BACKUP_FILE # Compress the backup file gzip $BACKUP_FILE定期执行备份脚本。您可以使用 cron 或其他定时任务调度工具实现此目的。
将备份文件传输到 Windows 系统上。您可以使用 FTP,SCP 或其他网络传输工具实现此目的。
解决 无用评论 打赏 举报 编辑记录