I have been tasked with performing backups of a VMware vCenter appliance database. We were unable to install the Backup Exec agent for Linux so we are dumping the database to disk and then using a script SCP’ing them over to another *nix box.
This is working fine, and I have it so on the appliance we only keep a weeks worth of backups.
The issue I am having is making sure the backups on the remote machine are in sync so there is only the weeks worth on both machines.
Rsync isn’t installed, so I have no idea how to handle deleting them remotely without setting up another script on the remote machine which I’d rather not do.
Any way this can all be accomplished in the one script?
If you can use
scp, you can probably usesshas well to execute remote commands.Try:
When it works, replace
-printwith-delete(or-exec rm "{}" \;if-deleteisn’t supported).