Hi all, Just writing my first backup procedure and wondered on a few points: Does this check the directory /home/jenny/cwp exists?
if [ -f /home/jenny/cwp/ ]; then
Also, is there a standard place backups are filed? I've created a directory called backups for now in my home directory, and will copy the cwp/ directory into the backups directory, but it would be far neater to somehow roll the directory up into one neat zipped tarball on a daily basis and stuff it in a special backup place. At the mo I have
cp -r /home/jenny/cwp/* /home/jenny/cwpbackup/
but could I have something like
tar zcf /home/jenny/cwp > /backups/cwpbak.tar
? Thanks all, jenny.
Hello,
On 19 Jul 2001 13:07:41 +0100, Jenny_Hopkins@toby-churchill.com wrote:
Hi all, Just writing my first backup procedure and wondered on a few points: Does this check the directory /home/jenny/cwp exists?
if [ -f /home/jenny/cwp/ ]; then
if [ -d /home/jenny/cwp/ ]; then
Also, is there a standard place backups are filed? I've created a directory called backups for now in my home directory, and will copy the cwp/ directory into the backups directory, but it would be far neater to somehow roll the directory up into one neat zipped tarball on a daily basis and stuff it in a special backup place.
I dont think theres a "standard". Id just say "do it" :)
Andrew.
On 19 Jul 2001, Andrew J Glover wrote:
if [ -f /home/jenny/cwp/ ]; then
if [ -d /home/jenny/cwp/ ]; then
Doh, I was wrong (didn't look at the option!) -d it is.
Two mistakes in as many days.... :-L Adam
On Thu, 19 Jul 2001 Jenny_Hopkins@toby-churchill.com wrote:
if [ -f /home/jenny/cwp/ ]; then
that should be correct
Also, is there a standard place backups are filed? I've created a
No not really any standard place to put backups.
cp -r /home/jenny/cwp/* /home/jenny/cwpbackup/
but could I have something like
tar zcf /home/jenny/cwp > /backups/cwpbak.tar
Yes you could but with tar you put the name of the output file first so what you would want would actually be:
tar -czf /backups/cwpbak.tar.gz /home/jenny/cwp/
Generally the way I am used to doing backups was with NFS mounts over the network and tar on local machines and using split when the tar files got to big for the filesystem to handle! also used smbclient to back up NT machines and used the mt program to write things to/from tape, eventually we replaced most of this system with the Amanda package.
Anyway yes you are going in the correct direction Jen,