Recover files using rdiff-backup command

136

Solution 1

I take it you are backing up a tarball which lives in a directory? if so, you'll have to restore the full file at some point in time. It usually works like:

rdiff-backup -r time file /destination/directory

so, for example, say you are trying to recover what's in a directory called example from your rdiff root dir:

cd /dir/of/rdiff/backup

rdiff-backup -r 3D example /tmp/newcopy

and it'll get you the copy as from 3 days ago and put it in /tmp/newcopy

read the man page, section RESTORING.

Solution 2

More info on the time format can be found in the rdiff-backup man page under "TIME FORMATS".

Share:
136

Related videos on Youtube

user2352040
Author by

user2352040

Updated on September 17, 2022

Comments

  • user2352040
    user2352040 almost 2 years

    Variable $now won't display unless it is dumped. It's populated. It doesn't display the "now is empty" string at all. It won't display what is inside $now unless it is var_dump or var_exported.

    $ipData = json_decode( $ttt, true);
    $now="";
    if ($ipData['timezone']) {
        $tz = new DateTimeZone( $ipData['timezone']);
        $now = new DateTime( 'now', $tz); // DateTime object corellated to user's timezone
    } else {
       // we can't determine a timezone - do something else...
    }
    
    
    
    if($now==""){echo "now is empty";}
    
    echo "<br />
    <br />
    ".$now->timezone.$now->date;
    var_dump($now);
    
    }
    

    if(isset($now)){echo "It is set.";} It's definitely set, though I set it to "" before I actually called it, so no matter what it was initialized.

    Even removing the $now=""; shows that it is initialized. var_dump($now); echos this:

    object(DateTime)#30 (3) { ["date"]=> string(19) "2013-05-06 22:52:29" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" } After var_dump $now->timezone is equal to America/New_York

    • user2352040
      user2352040 about 11 years
      var_dump($now); echos this: object(DateTime)#30 (3) { ["date"]=> string(19) "2013-05-06 22:52:29" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" } After var_dump $now->timezone is equal to America/New_York
  • Hulk
    Hulk almost 14 years
    Can u please let me know what is the specific time format that needs to be entered.There is no clear documentation for the time format that needs to be specified when restoring
  • Hulk
    Hulk almost 14 years
    Time format like 21 23:31:37 2010 ?
  • user2352040
    user2352040 about 11 years
    if(isset($now)){echo "It is set.";} It's definitely set, though I set it to "" before I actually called it, so no matter what it was initialized. Even removing the $now=""; shows that it is initialized. var_dump($now); echos this: object(DateTime)#30 (3) { ["date"]=> string(19) "2013-05-06 22:52:29" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" } After var_dump $now->timezone is equal to America/New_York