The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

need urgent help with mass file restore script...how??

Discussion in 'General Discussion' started by max01, Oct 1, 2006.

  1. max01

    max01 Registered

    Joined:
    Oct 1, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    hello :)

    i need to urgently restore a single file that is contained in most of my accounts that got wiped by a script in the server. but it is still contained in the backups, but it will take me ages to restore each and every one of them with cp -a /backup/daily/username/homedir/file to /home/username/file ..is there any mass way to do this? like a script that would do it for each account username?
     
  2. beehave

    beehave Well-Known Member

    Joined:
    Jun 26, 2005
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    That sounds pretty easy to do. I need the exact file name and paths(not for each user).
     
  3. beehave

    beehave Well-Known Member

    Joined:
    Jun 26, 2005
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    You quoted "/backup/daily/username/homedir/file"

    I asume you meant "/backup/cpbackup/daily/username/homedir/file"

    If my asumption is correct, this should work:

    BE SURE TO SET FILENAME VARIABLE
     
  4. beehave

    beehave Well-Known Member

    Joined:
    Jun 26, 2005
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    Guess it was'nt that urgent... :rolleyes:
     
  5. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Well; thank you very much for such script, beehave :)
     
  6. RandyO

    RandyO Well-Known Member

    Joined:
    Jun 17, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    16
    No but a nice script that is going in my file box :)
     
Loading...

Share This Page