Restoring a backup

From Redbrick Wiki
Revision as of 03:10, 20 April 2007 by Lil cain (talk | contribs)

If this has happened to you, you're able to restore your backups by copying files from redbricks backups.

Causes of needing to restore backups

Deleting all your files in a directory

rm * //Very bad, will delete all files from current folder

Overwriting a file.

If you're using vim, it will prompt you that you are overwriting a file if you didn't open the file for editing in the first place.
It tells you to add a ! to the write command to overwrite the file. Don't do this unless you're sure of what you're doing.

Howto restore from a backup

ssh carbon
cd /backup/webtree/webtree/u/username  (see note)
cp filename ~/public_html/    OR cp -R * ~/public_html/
exit


Note

There are 7 backup directories in /backup/webtree/ and /backup/home/. The newest of each of these are the ones without numbers (/backup/webtree/webtree/, and /backup/home/home). These are the backups for the previous night. The backup for two nights ago is .1, three nights is .2, and so on.

The example given above is for a user called 'username'. As you can see, the first directory you put in is the first letter of your username, followed by your full username.

Example of restoring a file

ssh carbon
cd /backup/webtree/webtree.1/d/drag0n
cp index.html ~/public_html/
exit

This will copy drag0ns (ie. me) index.html from a backup from 2 days ago into drag0ns public_html folder.