Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Restoring Multiple acccounts

General questions about VestaCP
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
joni
Posts: 60
Joined: Sat Aug 27, 2016 9:22 pm

Os: Ubuntu 18x
Web: nginx + php-fpm
Restoring Multiple acccounts
  • Quote

Post by joni » Mon Sep 05, 2016 9:34 am

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 ?
Top

Elizine
Posts: 50
Joined: Wed Aug 12, 2015 12:11 pm
Contact:
Contact Elizine
Website

Re: Restoring Multiple acccounts
  • Quote

Post by Elizine » Fri Sep 09, 2016 7:34 am

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
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Restoring Multiple acccounts
  • Quote

Post by skurudo » Wed Oct 23, 2019 9:28 am

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
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password