Rdiff backup restore file




















You also can use -l rather than --list-increments. The target here is the backup directory. The following is the actual output using a different target from an EC2 instance that I ran a cron job against to seed with changes for this article:. With this information in hand, I then can do the following to restore an increment from a particular time:.

I then would have a version of this article as it was when it was backed up at that particular time. There is a more user-friendly variation of this that uses a different view of time.

In that method, you specify time as an interval, using the following syntax integer[modifier] , where the modifiers are s, m, h, D, W, M and Y, and the time periods they represent are seconds, minutes, hours, days, weeks, months and years, respectively. The question then is, what happens if there is no increment that falls exactly on that time? The answer is, rdiff-backup uses the increment closest to that time that is not later than the specified time.

So, for this example, if there were an increment 2 days and 18 hours ago and one 2 days and 11 hours ago, it would use the one from 2 days and 18 hours ago. The second way to specify a restoration, a number-based restore, is based on the concept of session numbers, where the syntax is integer[B] , and 0B is the current mirror version.

So to restore from the second-most-recent backup, you would do -r 2B. Although the restore options are powerful, they do require command-line knowledge and a certain amount of familiarity with rdiff-backup. To ease the end-user experience, let's look at rdiffWeb, a Web-based interface for restoring files backed up using rdiff-backup. But first, here's a couple quick general usage tips. Each backup session is done in a transaction. This means if the session is interrupted, the next time you do a backup, the previous incomplete backup will be removed.

If you want to check for this condition, do:. If there is an incomplete backup in the directory, it will be rolled back. The transactional nature of a session means that there can be problems if you are backing up remotely over an unstable connection. This especially comes into play when doing an initial backup of a large dataset. One solution to avoid this potential problem is to do a local rdiff-backup backup, and then use rsync to sync the local rdiff mirror to a remote site.

Once the remote mirror is complete, change the rdiff-backup mirror directory from the local to the remote. From that point on, you will be transferring only the changes. Second, each time you do a backup, it creates an increment, and over time, these can build up.

To see the space being used by your backup directory, do this:. This is a good way of seeing where the storage is being used and the total for your backup directory. Unless you have unlimited backup disk space, at some point, you will want to start pruning your backup directory. To prune increments, use --remove-older-than 'time' , where time is specified the same as is used when restoring.

For my own personal data, I have a cron job that runs each night with:. Now as promised: rdiffWeb, available at www. It uses CherryPy to serve up its pages.

I am using the 0. The primary reason for this is that 0. SQLite comes bundled with Python 2. Be sure to follow the Installation link on the page listed above. The installation is fairly straightforward, but there are some manual changes you need to do for the program to function properly. Note that it's possible to set up rdiffWeb for https, which is how it is used for this article.

Other options are s, m, h, D, W, M, or Y indicating seconds, minutes, hours, days, weeks, months, or years respectively. After specifying the number or timeframe of backups to keep, the only other thing to specify is the backup location. The trimming of backup content is then performed on the given location.

So now you have your content backed up, and you need to restore something. A backup is only as good as the data you can restore out of it right? Fortunately the restore process fairly simple as well. The same can be done for an entire directory structure. Or if you are hunting for a specific day you can always do something like this. Active 11 years, 5 months ago. Viewed 6k times. If i have files like Available increments are: Time Size Cumulative size Sun Jul 25 4.

Improve this question. John Gardeniers 27k 12 12 gold badges 52 52 silver badges bronze badges. Hulk Hulk 1 1 gold badge 5 5 silver badges 16 16 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. 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.

Full list of core developers available at rdiff-backup Github page and on the credits page. The original author and maintainer was Ben Escoto from to After some hibernation time Sol1 took over the stewardship of rdiff-backup from February but there were no new releases.



0コメント

  • 1000 / 1000