LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 11-25-2005, 12:58 AM   #1
naveenlinux
LQ Newbie
 
Registered: Nov 2005
Distribution: SuSE
Posts: 10

Rep: Reputation: 0
Archiving


hi,

How can I archive or backup my /home directory on a daily basis automatically?

Please suggest me some methodologies,
Naveen
 
Old 11-25-2005, 07:51 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
1. create a shell script, which tars and compresses your home directory.
2. execute that shell script with cron daily.
 
Old 11-25-2005, 09:48 PM   #3
naveenlinux
LQ Newbie
 
Registered: Nov 2005
Distribution: SuSE
Posts: 10

Original Poster
Rep: Reputation: 0
Ok, but I want to have only incremental backup
Dow you know how that is done?

And can you please be more elaborative with commands and other stuff? I am new to this

Please,
Thanks
Naveen

Last edited by naveenlinux; 11-25-2005 at 09:57 PM.
 
Old 11-26-2005, 11:31 AM   #4
dennisk
Member
 
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279

Rep: Reputation: 30
There are lots of pre-made backup scripts out on the net if you'd just google for something like "tar backup script". I found one here:

Automating backups with tar

Dennisk
 
Old 11-30-2005, 02:35 AM   #5
naveenlinux
LQ Newbie
 
Registered: Nov 2005
Distribution: SuSE
Posts: 10

Original Poster
Rep: Reputation: 0
Hi Dennisk,

I tried the script that you gave in the link.

Yesterday i created a backup by name nav-Tue.tar manually using "tar". (nav is my system name)
And also executed the command:
"date +%d%b < /backups/last-full/nav-full-date" where i created the file nav-full-date as text file before I could use the above command. It displayed me 29Nov on the shell itself.

Now there is only one tar that is created yesterday. I dont find nav-Wed.tar in the folder backups.

And one more thing. I have commented Monthly full backup lines. So enabled only Weekly full Backup and incremental backups.

Do I need to check if the Cron.daily is running or not? And if so how do I do that?

OR is there any other problem?

Please reply
 
Old 11-30-2005, 04:01 AM   #6
naveenlinux
LQ Newbie
 
Registered: Nov 2005
Distribution: SuSE
Posts: 10

Original Poster
Rep: Reputation: 0
This is additional info:

When I run the command "cron" I get a message:
cron: can't lock /var/run/cron.pid, otherpid may be 4826: Resource temporarily unavailable

I dont hav crond. I have cron in /usr/sbin
the contents of /etc/crontab are:
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
#
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
14 4 * * * root rm -f /var/spool/cron/lastrun/cron.daily
29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly

etc/init.d/ contains cron. so i suppose the cron enabled to start at boot
 
Old 12-04-2005, 04:51 PM   #7
leandean
Member
 
Registered: Oct 2005
Location: Burley, WA
Distribution: Sabayon, Debian
Posts: 278

Rep: Reputation: Disabled
:~>crontab -l lists cron jobs for the current user.

I would set your backup script to run under user instead or root. Also, it's generally not a good idea to edit crontabs directly

to edit: use crontab -e
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Archiving Email KenGr Linux - Networking 1 06-25-2005 10:24 PM
mail archiving methods selgip Linux - Software 3 03-01-2005 07:58 PM
archiving the logs ANU Linux - Software 1 11-26-2003 07:42 PM
Archiving zymurgist Linux - General 8 02-10-2003 08:21 PM
Archiving theneoprotocol General 5 01-26-2002 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 12:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration