Re: backup script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, 28 Jan 2011, madunix@xxxxxxxxx wrote:

To: CentOS mailing list <centos@xxxxxxxxxx>
From: "madunix@xxxxxxxxx" <madunix@xxxxxxxxx>
Subject: Re:  backup script

I have reallocated it to /home
thx

On Fri, Jan 28, 2011 at 5:33 PM,  <cpolish@xxxxxxxxxxxx> wrote:
madunix@xxxxxxxxx wrote:
Should I add to my tar the following option
Â-p, --preserve-permissions
       extract all protection information
tar -cvzfp ......

Thanks

On Tue, Jan 25, 2011 at 7:10 PM, John Doe <jdmls@xxxxxxxxx> wrote:
> From: "madunix@xxxxxxxxx" <madunix@xxxxxxxxx>
>
>> I want to create bash script to have a zip copy from a website running
>> on Âlinux /var/www/htdocs/* local on the same box on different
>> directory
>> I am Âthinking to do a local backup using crontab (snapshot my web)
>> tar -cvzf Â/tmp/website-$(date +%Y%m%d-%H%M).tgz /var/www/htdocs/*
>> This command will Âcreate a file /tmp/website-20110101-1459.tgz
>> I want it run on daily basis and Âto keep the last 5days backup on the
>> box and remove older version than Â5days.
>
> A quick way to do it is to use the day of the week:
> Âwebsite-$(date +%u).tgz
> It will automaticaly keep the last 7 days...
> Otherwise, you will have to use date calculations...

I hope I'm not duplicating something someone has already said --
/tmp may not be the best possible choice for backups. A reboot
could potentially "help" by cleansing that directory. Off-host
copies (eg, scp website-20110101-1459.tgz fred@otherhost:/home/fred/backups/)
would address a number of risks.

Hi Charles.

You might find this php script I wrote handy:

http://forums.fedoraforum.org/showthread.php?t=248436

I use a seperate 500GB drive just for storing backups of various things I don't want to loose. Then at certain intervals (ie when I think needed), I burn the backups to CD or DVD - just to be extra safe!

Most of my backup scripts are run by cron jobs overnight.

Kind Regards,

Keith Roberts

-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux