hello,
how i make restore all files and of the all account users in one time?
thanks
restore all files
-
- Junior Member
- Posts: 1
- Joined: 20 May 2013, 11:58
Re: restore all files
I have created a bach script for this action, so you can create the script and run it after editing the pathes of scan directoy under quarantin dir (/backup/cxs/safe/scan/) :
#!/bin/bash
for u in `/bin/ls -1 /backup/cxs/safe/scan/` ;
do
echo $u ;
for l1 in `/bin/ls -1 /backup/cxs/safe/scan/$u/*.restore`;
do
F1=$(awk 'NR==2' $l1);
F2=$(awk 'NR==5' $l1);
mv $F1 $F2;
rm -f $l1;
done
echo "User '$u' CXS files are restored";
done
#!/bin/bash
for u in `/bin/ls -1 /backup/cxs/safe/scan/` ;
do
echo $u ;
for l1 in `/bin/ls -1 /backup/cxs/safe/scan/$u/*.restore`;
do
F1=$(awk 'NR==2' $l1);
F2=$(awk 'NR==5' $l1);
mv $F1 $F2;
rm -f $l1;
done
echo "User '$u' CXS files are restored";
done