LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-27-2006, 11:29 AM   #1
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Rep: Reputation: 30
Angry About Dump Dates


Help ,
I am not an expert at Linux but I am not new either . And almost everyday I run into something I don't have a clue about . Now it seems I cannot even set a date correctly .

I used Dump once to save a partition /dev/hda7 however I forgot to use u to set the backup time . Now all I want to do is set a date 1 day after the previous backup and backup changed and new files .
I have tried every possible combination of dates and all I get is Bad time after the -T option . I did cat /etc/dumpdates and set the date according to that style - no luck.
 
Old 02-28-2006, 04:22 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
I am not able to get you.

are you trying to change the timestamp of that dump file ???
 
Old 02-28-2006, 05:03 AM   #3
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
masand, I think anilbh is actually trying to add a line to /etc/dumpdates that represents the dump that was done.
The -u option was simply forgotten, so the /etc/dumpdates file wasn't updated.

anilbh, using a special "ls" command may reveal the ctime of the dump file, as recorded in /etc/dumpdates.
Code:
ls -l --time=ctime --time-style='+%s' dump_file
-l displays more info than just the filenames
--time=ctime makes sure that the ctime is shown, not the last modified time
--time-style='+%s' (see also "man date") displays all timestamps (so the ctime) as the number of seconds since epoch (1970-01-01 00:00:00), as requested in /etc/dumpdates.

So, you can always retrieve all the information that needs to go in /etc/dumpdates.
Using -u when dumping just adds another record to /etc/dumpdates. But you can always add additional lines to /etc/dumpdates directly too (you'll probably need root access).

Using the -T option of dump can work too. It's supposed to get a timestamp in the same format as the format of /etc/dumpdates, so you were spot on with that approach.
If you want to use this approach, use the following steps:
-get the ctime of your dump via the "ls" I explained above
-then add (ie in a calculator) 86400 seconds (equivalent of 1 day) to the ctime you got
-then use dump -T calculated_time
 
Old 03-06-2006, 02:09 AM   #4
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Post

Sorry I had more problems - the system crashed...
Yes I had forgotten to use -u did not know it was essential. The I tried to back up using -T here I can try any format and it just does not work . Finally I did add a line in the dump dates file using an editor.
 
Old 03-06-2006, 02:13 AM   #5
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Smile

Hi Massand ,
Thank you .
I was looking for the thanks button . What a good idea . But where is it ?
 
Old 03-06-2006, 04:46 AM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
Quote:
Originally Posted by anilbh
Hi Massand ,
Thank you .
I was looking for the thanks button . What a good idea . But where is it ?

yes i think i need to edit my signature.I haven't done that after the site re-make.

Thanks for reminding me about that.

BTW what idea are u talking about ?

regadrs
 
Old 03-07-2006, 07:57 PM   #7
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Unhappy

Quote:
Originally Posted by masand

Thanks for reminding me about that.

BTW what idea are u talking about ?

regadrs
The others seem to have understood . I will have to go thru my query again to answer that. Will do...
OKI did a dump without using -u . Now I wanted to do an incremental dump and I wanted to set a Date for the -T option. However I gave all the alternatives for dates and it would not accept . It seems Date and time have to be in the ctime format . Have to find out what that is. It is amazing what a lot of ignorance Windows tolerates . In fact that is the main problem for those who want to 'try out Linux'.

Last edited by anilbh; 03-07-2006 at 08:01 PM.
 
Old 03-08-2006, 01:33 AM   #8
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
ctime format is nothing abnormal. It's just the number of seconds since "epoch" (a special date in the past, usually 1st Jan 1970, 00:00:00).

See also my post above and the man pages of the "date" command.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Difference between two dates Uday123 Programming 5 02-23-2009 06:26 AM
f-spot dates viniosity Linux - Software 1 08-07-2005 07:43 PM
file dates digitalgravy Linux - General 2 01-20-2005 10:58 AM
How to forcely dump the history of user commands to the admin dump file. mcp_achindra Linux - Security 1 03-19-2004 12:04 PM
need to manipulate dates clsonnt Programming 5 08-19-2003 10:07 AM


All times are GMT -5. The time now is 06:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration