Пример #1
0
        public DatabaseDumpTest()
        {
            _backupPath     = @"C:\Data\Backup\MySQL\";
            _backupPathTemp = @"C:\Data\Backup\MySQL\Temp\";
            _database       = "my_test_db";
            _createPath     = new CreatePath();
            _clearPath      = new ClearPath();

            _databaseDump = new DatabaseDump()
            {
                BackupPath      = _backupPath,
                DbPassword      = "******",
                DbUser          = "******",
                DumpFileStamp   = DateTime.Now,
                MySqlServerPath = @"C:\Program Files\MySQL\MySQL Server 5.7\bin"
            };

            _createPath.Go(_backupPath);
            _createPath.Go(_backupPathTemp);
            _clearPath.Go(_backupPathTemp);
        }
Пример #2
0
        public EntryPoint(
            ICreatePath createPath, IClearPath clearPath, IDatabaseDump databaseDump, IZipAndMove zipAndMove, IPurgeLocal purgeLocal,
            IFtpCreateRemotePath ftpCreateRemotePath, IFtpSendFileToRemote ftpSendFileToRemote, IFtpListDirectoryOnRemote ftpListDirectoryOnRemote,
            IFtpPurgeRemoteData ftpPurgeRemoteData, string backupPath, string backupPathTemp, string remoteBasePath, StringCollection dbList)
        {
            _createPath               = createPath;
            _clearPath                = clearPath;
            _databaseDump             = databaseDump;
            _zipAndMove               = zipAndMove;
            _purgeLocal               = purgeLocal;
            _ftpCreateRemotePath      = ftpCreateRemotePath;
            _ftpSendFileToRemote      = ftpSendFileToRemote;
            _ftpListDirectoryOnRemote = ftpListDirectoryOnRemote;
            _ftpPurgeRemoteData       = ftpPurgeRemoteData;

            _backupPath     = backupPath;
            _backupPathTemp = backupPathTemp;
            _remoteBasePath = remoteBasePath;

            _dbList = dbList;
        }