restore all files

Community forum to discuss cxs.
If you believe that there is a problem with your cxs installation and want support then, as a paid product, you should use the helpdesk after having consulted the documentation.
Post Reply
muchacho
Junior Member
Posts: 3
Joined: 20 Dec 2012, 15:16

restore all files

Post by muchacho »

hello,

how i make restore all files and of the all account users in one time?

thanks
BahaaHeiba
Junior Member
Posts: 1
Joined: 20 May 2013, 11:58

Re: restore all files

Post by BahaaHeiba »

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
Post Reply