Restoring Multiple acccounts
Restoring Multiple acccounts
hallo,
Is thare a way for restoring multiple accounts at once instead of restoring accounts one by one with command ?
And why is Restore Option in VestaCP in controlling panel, can the Restoring be done through this option without command in ssh ?
Is thare a way for restoring multiple accounts at once instead of restoring accounts one by one with command ?
And why is Restore Option in VestaCP in controlling panel, can the Restoring be done through this option without command in ssh ?
Re: Restoring Multiple acccounts
You can create a bash script something like this:
Code: Select all
#!/bin/bash
DATE=$(date +%F)
FILES=$(find /home/backup -name "*$DATE.tar")
for f in $FILES
do
FILE=$(basename $f)
USER=$(echo $FILE | cut -f1 -d".")
echo "v-restore-user $USER $FILE"
#v-restore-user $USER $FILE
done
exit 0
Re: Restoring Multiple acccounts
A little change in script with date format:
Code: Select all
#!/bin/bash
DATE=$(date +%F %T)
FILES=$(find /backup/ -name "*$DATE.tar")
for f in $FILES
do
FILE=$(basename $f)
USER=$(echo $FILE | cut -f1 -d".")
echo "v-restore-user $USER $FILE"
v-restore-user $USER $FILE
done
exit 0