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/shBACKUPDATE=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
Comments
Submitted by JamieCameron on Tue, 01/12/2010 - 17:18 Comment #1
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.
Submitted by masp on Wed, 01/13/2010 - 01:51 Comment #2
if it possible to run SH each time on each backup done(in complex backup)?
Submitted by JamieCameron on Wed, 01/13/2010 - 01:53 Comment #3
Sorry, no .. the script is only run when the whole backup is complete.
What do you want it to do exactly?
Submitted by masp on Wed, 01/13/2010 - 01:57 Comment #4
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)
Submitted by sgrayban on Wed, 01/13/2010 - 05:00 Comment #5
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 ?
Submitted by masp on Wed, 01/13/2010 - 05:48 Comment #6
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
Submitted by JamieCameron on Wed, 01/13/2010 - 12:15 Comment #7
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)
Submitted by Issues on Thu, 01/28/2010 - 13:21 Comment #8
Automatically closed -- issue fixed for 2 weeks with no activity.