Restoring a backup: Difference between revisions

From Redbrick Wiki
Jump to navigation Jump to search
(newbs)
 
Line 20: Line 20:
ssh carbon
ssh carbon
cd /backup/webtree/webtree.1/d/drag0n
cd /backup/webtree/webtree.1/d/drag0n
cp index.html ~/public_html/.
cp index.html ~/public_html/
exit
exit
</pre>
</pre>


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

Revision as of 16:28, 19 February 2007

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[.{1-6}]/{a-z}/<username>
cp filename ~/public_html/.    OR cp -R * ~/public_html/.
exit

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.