`
isiqi
  • 浏览: 16488372 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

Backup Website Code、Database to Remote Server/Ftpserver Automatically

阅读更多

Part I backup plan and host info

A simple backup system plan

The main advantage of using FTP or NAS backup is a protection from data loss.

I am going to write about FTP backup solution here. The idea is as follows:

  • Make full backup every day night
  • Also we can backup only those files that has been modified since the full backup (incremental backup) as a seven-day backup cycle.

Our sample setup-this is a full backup demo

Local Server ===>>> Remote Server[ftp/nas server]

IP:192.168.1.10/192.168.1.11 ===>>> 192.168.1.12

Let us assume that your ftp details are as follows:

  • FTP server IP: 192.168.1.12
  • FTP Username: R_to+FTP-test
  • FTP Password:Pass_$$$$
  • FTP Directory: /bak (or /)

You will store data at remote server as follows:
=>> /bak/web/192.168.1.10/files mm-dd-yy - Full backup
=>> /bak/db/192.168.1.11/ files mm-dd-yy - Full backup

Local Server:Server A& Server B info

Server A :Website win2003 OS

ip:192.168.1.10

Website code path e:\website\longrujun.name

Server B :Database WIN2003+MSSQL2005

Ip:192.168.1.11

Database related info

E:\bak\Full

\Diff

\Logs

Remote Server:Server C info

Ftp server Account info win2003+Server-U

Ip:192.168.1.12

Username:R_to+FTP-test

Passwd:Pass_$$$$

Main Home Directory E:\bak

The detail architecture as the following describes

E:\bak\web:archive the ServerA’s website code

\db:archive the serverB’s database files

\logs:archive the web logs

Part II:Config

1、 backup website code to remote ftp server

ADownload the AutoRun.rar file on ServerA’s Disk F and extract

BOpen AutoRun folder and make 2 config files in run folder

web_to_remote.bat

======start====

rar a -m0 F:\Autorun\backup\10website%date:~2,2%%date:~5,2%%date:~8,2%.rar e:\website\longrujun.name

cd F:\Autorun\backup

F:

ftp -v -n -s:F:\Autorun\run\ftp10website.txt 192.168.1.12

del F:\Autorun\backup\*.rar /a /s /q /f

=======end=====

ftp10website.txt

=======start===

open 192.168.1.12

user R_to+FTP-test Pass_$$$$

cd web

cd 192.168.1.10

bin

prompt

mput *.rar

bye

========end====

Ok,now,pls add the web_to_remote.bat to scheduled task and run it a day

2、 backup database files to remote ftp server

the 2 steps as the upper ways

A、 Download the AutoRun.rar file on ServerA’s Disk F and extract

B、 Open AutoRun folder and make 2 config files in run folder

db_to_remote.bat

======start====

rar a -m0 F:\Autorun\backup\10website%date:~2,2%%date:~5,2%%date:~8,2%.rar E:\bak\Full

cd F:\Autorun\backup

F:

ftp -v -n -s:F:\Autorun\run\ftp11db.txt 192.168.1.12

del F:\Autorun\backup\*.rar /a /s /q /f

=======end=====

ftp11db.txt

=======start===

open 192.168.1.12

user R_to+FTP-test Pass_$$$$

cd db

cd 192.168.1.11

bin

prompt

mput *.rar

bye

========end====

The same as we should add the db_to_remote.bat to scheduled task and run it a day

分享到:
评论

相关推荐

    Database4 1926079

    备份还原(Backup/Restore Database): MySQL/SQL Server/PostgreSQL 支持代码自动生成(Code Generation): Access/Firebird/MySQL/Oracle/PostgreSQL/SQL Server/SQL Server CE/SQLite 支持数据库服务管理...

    Uniwin to develop C/C++ systems on remote Unix servers

    By automatically synchronizing the source files on the client with the server and replacing GNU toolsets with some small stubs for them, Uniwin presents a seamless interface for remote development....

    优秀数据库工具 Database .NET Free 32.1.7761.1 + x64.zip

    备份还原(Backup/Restore Database): MySQL/SQL Server/PostgreSQL 支持代码自动生成(Code Generation): Access/Firebird/MySQL/Oracle/PostgreSQL/SQL Server/SQL Server CE/SQLite 支持数据库服务管理...

    Database Comparer VCL v 5.0

    You can view all the differences between databases and execute an automatically generated script to eliminate all or selected only differences. The library includes more than 25 components for ...

    [开发工具] SQL Toolbelt 1.8.2.238

    SQL Refactor - helps the user to automatically format your SQL code and database objects that provides a fast and easy management of databases. SQL Doc - provides a mnogodokumentalnoy database. SQL ...

    CuteFTP 8 Professional

    The Local Backup Wizard that guides you through the process of selecting the local files and folders to be backed up to the remote pane and specifying other settings. The Site Backup Wizard that ...

    UE(官方下载)

    Use UltraEdit's powerful user tools to launch your favorite website from the click of a button on your toolbar Integrate Yahoo!, Google, Wikipedia and more with UltraEdit This tutorial will show you ...

    Serial Port Server with sample code

    2) Try to connect to the servers in [Server] ;; section if there are ;; Sock/Close : Close all sockets ;; Sock/Debug : Shows socket messages in the window ;; Sock/Hex : Shows the data come from the ...

    mysql安装失败

    win7 系统 the security settings could not be applied to the database 在安装mysql的时候,就会遇到以下错误。遇到错误不可怕,怕的就是被错误所击倒! The security settings could not be applied to the ...

    Ant To Download the code from SVN automatically

    标题“Ant To Download the code from SVN automatically”涉及的是使用Apache Ant工具自动化从Subversion (SVN) 下载代码的过程。Apache Ant是一个Java库和命令行工具,它的设计目的是驱动构建过程,尤其在Java项目...

    ASP.NET MVC with Entity Framework and CSS [2016]

    • Using code first migrations to automatically update the database plus seeding data from code • How to use Visual Studio Scaffolding views and controllers • Manage CRUD operations including model ...

    Dimeric.Virtual.Database.

    This escape syntax is automatically translated into appropriate code for the database‘s SQL dialect. For example, the macro for the database‘s current date and time would be CURRENT for the ...

    aria2 win64位版本

    下载工具,aria2 is a utility for downloading files. The supported protocols are... Using Metalink's chunk checksums, aria2 automatically validates chunks of data while downloading a file like BitTorrent.

    Linux: Powerful Server Administration

    Install and configure common standard services such as web, mail, FTP, database and domain name server technologies Create kickstart scripts to automatically deploy RHEL 7 systems Use Orchestration ...

    Database design & Database deployment software BDB 2007 Professional V2.3

    2. cross-database platform: only need to give a definition accoding to the familiar database platform,BDB can Automatically intall and Arbitrarily move the database in these database platforms. ...

    Database design & Database deployment software BDB 2007 Developer V2.3

    2. cross-database platform: only need to give a definition accoding to the familiar database platform,BDB can Automatically intall and Arbitrarily move the database in these database platforms. ...

Global site tag (gtag.js) - Google Analytics