Exemple #1
0
        public PurgeLocalTest()
        {
            var backupPath = @"C:\Data\Backup\MySQL\";

            _purgeLocal = new PurgeLocal()
            {
                LocalRetention = 30,
                LocalPath      = backupPath
            };

            new PurgeAll().Go(backupPath);
            new CreateDummyFiles().CreateHundred(backupPath);
        }
        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;
        }