backup feature+ sh

It will be perfect to run some custom sh script each time, when each virtual server backup done Please! think it is useful and easy to make...

something like (for example)

Secure server backup logic 1) find all buckup files *.gz 2) encode them to *.gz.out 3) remove gz file 4) upload to ftp 5) remove encoded file

Secure server backup script

!/bin/sh

BACKUPDATE=date +%Y-%m-%d; find . -type f -name "*.gz" -print|while read myfile do openssl enc -aes-256-cbc -salt -in "$myfile" -out "$myfile".out -pass pass:PaSSwordThere; rm "$myfile" ; curl -v -T "$myfile".out ftp://login:"FTppassThere"@ftpserveraddres.com/${BACKUPDATE}/"$myfile" -Q "MKD ${BACKUPDATE}"; curl -v -T "$myfile".out ftp://login:"FTppassThere"@ftpserveraddres.com/${BACKUPDATE}/"$myfile" ; rm "$myfile".out ; echo "$myfile" "\n" ; done

http://askmetoo.com/unix/encoded-backup/

Status: 
Closed (fixed)

Comments

Actually, this is already possible .. when you create a new scheduled backup, there is a "Command to run after backup" field for entering a script to run that can do anything you want.

However, since it runs as root only root has access to this option.

if it possible to run SH each time on each backup done(in complex backup)?

Sorry, no .. the script is only run when the whole backup is complete.

What do you want it to do exactly?

yes I can run my SH at end, but to save space will be better to run SH each time ... (my SH encode backup and upload them to ftp)

I have to admit the aes encoding is a nice little security feature.... Maybe this is something that could be included in the future for secure backups ? Maybe a check box to encode or not ?

yes? it well be perfect, if you enable feature secure backup in virtualmin like openssl enc -aes-256-cbc -salt -in "$myfile" -out "$myfile".out -pass pass:PaSSwordThere;

also recover from secure backup

That's a not a bad idea .. I could add a feature to Virtualmin to perform GPG encryption of backups (since we use GPG elsewhere in the code)

Automatically closed -- issue fixed for 2 weeks with no activity.