Data Backup and Recovery

SnapCenter VMWare Plugin showing old backups

Chandler
2,855 Views

A while back we upgraded from SC 4.0 and are now running 4.4 however when we go to restore a VM for example it lists all backups since 2019.  Is there an easy method to purge these?  I'm not seeing the "Cleanup" process in the vCenter SC task logs but I've verified with support through the API that the cron job is configured.  Can the cleanup be ran manually like on the SC server but on the SCV Plugin?  Due to this, selecting a backup for restore takes quite a while due to the size of the backup list.

3 REPLIES 3

Chandler
2,800 Views

Update:

I've found that manually changing the API entry under Put Schedules and changing this entry to a manual time for it to run would execute the "Clean secondary backup" job to run:

{

"name": "Schedule-PurgeBackups",

"cronExpression": "0 30 8 ? * SUN *"

}

 

So the example above kicked it off at 8:30am on Sunday.  However, it's not cleaning up due to the following errors:

2021-08-15 03:30:52.128 -04:00 [ERR] Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
---> MySql.Data.MySqlClient.MySqlException (0x80004005): Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_BackupVolumeSharing`, CONSTRAINT `FK_nsm_BackupVolumeSharing_nsm_Backup` FOREIGN KEY (`nsm_Backup_Id`) REFERENCES `nsm_Backup` (`nsm_Backup_Id`))
---> MySql.Data.MySqlClient.MySqlException (0x80004005): Cannot delete or update a parent row: a foreign key constraint fails (`nsm`.`nsm_BackupVolumeSharing`, CONSTRAINT `FK_nsm_BackupVolumeSharing_nsm_Backup` FOREIGN KEY (`nsm_Backup_Id`) REFERENCES `nsm_Backup` (`nsm_Backup_Id`))
at MySqlConnector.Core.ServerSession.TryAsyncContinuation(Task`1 task) in C:\projects\mysqlconnector\src\MySqlConnector\Core\ServerSession.cs:line 1240
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\Core\ResultSet.cs:line 42
at MySql.Data.MySqlClient.MySqlDataReader.ActivateResultSet(ResultSet resultSet) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 74
at MySql.Data.MySqlClient.MySqlDataReader.ReadFirstResultSetAsync(IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 300
at MySql.Data.MySqlClient.MySqlDataReader.CreateAsync(MySqlCommand command, CommandBehavior behavior, ResultSetProtocol resultSetProtocol, IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 293
at MySqlConnector.Core.TextCommandExecutor.ExecuteReaderAsync(String commandText, MySqlParameterCollection parameterCollection, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\projects\mysqlconnector\src\MySqlConnector\Core\TextCommandExecutor.cs:line 52
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteAsync(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(DbContext _, ValueTuple`2 parameters, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IReadOnlyList`1 entriesToSave, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at NetApp.DataProtection.Services.Backup.Repository.BackupRepository.CleanupSecondaryBackup(Int64 backupId, IEnumerable`1 backupToObjectsMaps, CancellationToken cancellationToken)
at NetApp.DataProtection.Services.Backup.API.Services.Strategies.CleanupSecondaryBackupsStrategy.CleanupSecondaryBackup(IBackupRepository repository, Int64 backupId, Dictionary`2 volumeSnapshots, HashSet`1 volumeSkipList, RelationShipType type)
at NetApp.DataProtection.Services.Backup.API.Services.Strategies.CleanupSecondaryBackupsStrategy.DeleteBackup(SmDeleteBackupsRequest request, IDeleteBackupService service, CancellationToken cancellationToken)

Chandler
2,798 Views

Update 2:

I've manually deleted a few backups from the vCenter interface and ran the Cleanup job again and that seems to have fixed the issue.  I suppose it kept information from older snaps that were originally on the 4.2 version, prior to the Data Brokers.

The only issue I have now is that there are a few backups that through vCenter don't allow me to Delete since it's greyed out and the SCV doesn't have a record.  A support case could be open to manually delete them.

Chandler
2,792 Views

Update 3:

It appears that the older backups are showing as Mounted and I can't find a way to get their ID to unmount them.  When I select them to unmount, nothing appears in the unmount window.  Is there a way to force show Unmounted in vCenter?

Public