数据库备份有时候仅仅是为了备份,而不需要压缩,较大数据库压缩很耗时,但是备份缺很快
大石头 authored at 2017-08-29 15:01:40
1.42 KiB
X
@using NewLife.Common;
@using NewLife.Cube.Admin;
@using XCode.DataAccessLayer;
@{
    Layout = NewLife.Cube.Setting.Current.Layout;

    //ViewBag.Title = "服务器信息";
    var dbs = Model as IList<DbItem>;
}
<table class="table table-bordered table-hover table-striped table-condensed">
    <thead>
        <tr>
            <th class="text-center">名称</th>
            <th class="text-center">类型</th>
            <th class="text-center">连接字符串</th>
            <th class="text-center">版本</th>
            <th class="text-center">备份</th>
            <th class="text-center">备份并压缩</th>
            <th class="text-center">下载表结构</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in dbs)
        {
            var dal = DAL.Create(item.Name);
            <tr>
                <td>@item.Name</td>
                <td>@item.Type</td>
                <td><span title="@dal.Db.ConnectionString">@item.ConnStr</span></td>
                <td>@item.Version</td>
                <td>@Html.ActionLink("备份", "Backup", new { Name = item.Name }),共 @item.Backups.ToString("n0")个</td>
                <td>@Html.ActionLink("备份并压缩", "BackupAndCompress", new { Name = item.Name })</td>
                <td class="text-center">@Html.ActionLink("下载", "Download", new { Name = item.Name })</td>
            </tr>
        }
    </tbody>
</table>