HomeHome  PortalPortal  FAQFAQ  SearchSearch  RegisterRegister  Log in  
openFate
openFATE - openSUSE feature tracking
Latest topics
» Difference between 42.2 and 42.1
by findoctr Thu Dec 15, 2016 7:53 pm

» openSUSE Leap 42.1 ?
by findoctr Fri Feb 05, 2016 8:09 pm

» Happy Turkey Day
by findoctr Thu Nov 26, 2015 1:45 pm

» Happy 4th of July!
by bozo Sat Jul 04, 2015 12:56 pm

» It's been a while ...
by bozo Mon Feb 23, 2015 8:34 pm

» Mondo chillers
by bozo Wed Feb 18, 2015 5:11 am

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
IRC Channel
You can also find us on IRC's freenode.net as #suseunbound.

Share | 
 

 Automatically dating your tar backups

View previous topic View next topic Go down 
AuthorMessage
welan
Admin
avatar

Posts : 248
Join date : 2010-02-23
Age : 54
Location : snow drift in minnesota

PostSubject: Automatically dating your tar backups   Mon Mar 15, 2010 5:58 pm

Normally, we use the tar command coupled with some compression program such as gzip to create a backup of our directories. I.e.

# tar -cf /var/log/backup/tux.tar /home/tux

to backup the home directory of the user tux into the directory /var/log/backup.

However, if we are going to do this on a regular basis, we will be overwriting the file tux.tar. This would mean that we will only have one snapshot of the user tux home directory.
To keep copies of backups from different times, you will need to use different filenames, preferably with a date indicator. You can easily do this by,

# tar –cf /var/log/backup/tux-`date +%F`.tar /home/tux

Of course, if you backup a few times within the day, then you may want to use a different option from the +%F format option.
and thank you for flying Penguin Air.

_________________
An expert is a man who tells you a simple thing in a confused way in such a fashion as to make you think the confusion is your own fault. 
Back to top Go down
 
Automatically dating your tar backups
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
SUSEUnbound :: Help Section :: Tips and Tweaks-
Jump to: