[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] backup raq3
- Subject: Re: [cobalt-users] backup raq3
- From: "Carrie Bartkowiak" <ravencarrie@xxxxxxxx>
- Date: Mon Jan 22 15:04:13 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> Anyone know the command, via command line, to backup the whole of this
server? I can then ftp the whole lot
>
>
> Cheers
> G.
'G',
If it's just the site that you're wanting to back up, you can pack it into a
tarball.
CD as root into /home/sites and type this:
tar -c --verbose --file=home.tar home
Broken down, this is:
(tar)use the tar program (-c)create a tarball (--verbose)show me all the
files as you're doing it
(--file=home.tar)take the tarball and name it home.tar (home)this is the
directory I want you to ball up.
Then change the ownership of the tarball to admin, so you can download it
via ftp:
chown admin home.tar
If you ever need to use it to restore the directory, upload it somewhere
that you have permission to upload to (when migrating my server this past
week I used /home/tmp)
Again cd into the /home/sites directory as root.
Copy the tarball over into that directory and give it the same name:
cp /home/tmp/home.tar home.tar
(Copying is better than moving, in case something goes wrong, you don't need
to spend all that time uploading it again)
Then untar it:
tar -xvf home.tar
You'll watch it unpack just like you watched it pack everything up. If
there's already a file/directory there with the same name, it will overwrite
that file/directory with the version from the tarball.
This method preserves all of the permissions and the ownerships of the
files - *really* handy and time-saving, lemme tell ya. :)
After you've verified that everything is at it should be, you can delete the
original tarball and the copied version:
rm /home/sites/home.tar
rm /home/tmp/home.tar
Hope that helps!
Carrie Bartkowiak