LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Backing up a Filesystem... sort of... (https://www.linuxquestions.org/questions/linux-software-2/backing-up-a-filesystem-sort-of-547152/)

astrocrep 04-18-2007 05:53 PM

Backing up a Filesystem... sort of...
 
What I want to do is this...

Take my whole root fs... the /etc /bin /usr.... all of it, and move it to an archive location...

What I would like to know, is:

1.) Can this be done? And how?
2.) Restoring the files back to the original location.

Let me further clarify a couple of things.

1.) The enviornment (ie pc and file system types) will always be the same.
2.) Before recovering the file systems would be properly formatted.

Basically, the simplist answer would be the best...

Could I just do a "cp -r /* /home/rich/archive"
Well I guess I would need a way for it to skip a folder...

Thanks,
Rich

homey 04-18-2007 07:47 PM

Yes this can be done BUT....
1. I would use and external partition mounted in /mnt and not /home

2. If you are backing up a system that is in use, you need to exclude /proc /dev and external filesystems like those in the /mnt/ folder.

I use rsync or cp to do that. For example:
Code:

mkdir /mnt/backup
mount /dev/hdb1 /mnt/backup

rsync -xav / /mnt/backup
or
cp -xav / /mnt/backup

You will need to use a livecd to format the partition and restore the system onto it.


All times are GMT -5. The time now is 06:05 AM.