08-31-2012
FULL or INCREMENTAL ???
Hi. Can someone tell me if the following script that i have made is a script for INCREMENTAL BACKUP or FULL BACKUP. My teacher told me that is doing an FULL BACKUP.
• find /etc /var /home -newer /backups/.backup_reference > /backups/.files_to_archive
• touch /backups/.backup_reference
• tar -zcvf /backups/incr/incr_backup-$(date +%F).tar.gz --files-from /backups/.files_to_archive
#!/bin/bash
echo "$(/bin/date +"%Y-%m-%d %H:%M:%S") START backup incremental..."
/bin/find /etc /var /home -newer /backups/.backup_reference > /backups/.files_to_archive
/bin/touch /backups/.backup_reference
/bin/tar -zcvf /backups/incr/incr_backup-$(date +%F).tar.gz --files-from /backups/.files_to_archive
echo "$(/bin/date +"%Y-%m-%d %H:%M:%S") FINISH backup incremental..."
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I would like to create a daily incremental backup of a directory with all of the files within and add a timestamp (year-month-day) to the tar.gz file.
I have the following, but it doesn't backup the inside files of the directory.
#!/bin/bash
tar -czf... (1 Reply)
Discussion started by: agasamapetilon
1 Replies
2. UNIX for Dummies Questions & Answers
let says, i have this number as 000002080, i want to add 1 to make it 000002081, and then i want to add 1 to 000002082, add 1 to 000002083, 84.
i=000002080
TOT=$(echo "scale=9; $i + 1" | bc)
echo $TOT
it shows 2081, i want to retain 000002081, 000002082, 000002082, 000002084. (2 Replies)
Discussion started by: tjmannonline
2 Replies
3. Windows & DOS: Issues & Discussions
I have a folder /root/test in a centos 5.3 system. I want to take an incremental backup of the contents of the folder in the C:\Downloads folder of a windows system present in the same lan as the linux system. What are the ways of executing this plan? Kindly help (0 Replies)
Discussion started by: proactiveaditya
0 Replies
4. UNIX for Dummies Questions & Answers
Hi, i'm new here(and a newbie) and i need some help with a project. I need to write a script for an incremental backup (this must be executed every day at 24:00) and a full backup (executed once a month) for etc/var/home directories. Can someone please help me with this? And a small explanation of... (9 Replies)
Discussion started by: bender-alex
9 Replies
5. Homework & Coursework Questions
Hi. Can someone tell me if the following script that i have made is a script for INCREMENTAL BACKUP or FULL BACKUP. My teacher told me that is doing an FULL BACKUP.
• find /etc /var /home -newer /backups/.backup_reference > /backups/.files_to_archive
• touch /backups/.backup_reference
• tar... (1 Reply)
Discussion started by: bender-alex
1 Replies
6. Shell Programming and Scripting
Would it be possible for a script to duplicate a file and incrementally number it?
File in: XXX_007_0580_xxxx_v0016.aep
File out: XXX_007_0580_xxxx_v0017.aep
If someone knows of a way I'd love to see it.
Thanks! (7 Replies)
Discussion started by: scribling
7 Replies
7. UNIX for Beginners Questions & Answers
Hi Guys,
am trying to write logic to do incremental value using linux
Example:
a=00.00.00.01
My b should be like this
b=00.00.00.02
and when it reaches 99 my b should look like this
b=00.00.01.99
Appreciate your help guys
Please use CODE tags when displaying sample input, sample... (14 Replies)
Discussion started by: buddi
14 Replies
8. AIX
AIX Version 6.1 and 7.1.
I understand that when the OS initially creates the FS and inodes, its pretty strict, but not always tuned to a 1:1 ratio. I see the same thing when adding a whole disk LV to a separate device.
It seems that when we expand a filesystem the inodes don't get tuned... (5 Replies)
Discussion started by: mrmurdock
5 Replies
LEARN ABOUT PHP
intldateformatter.getcalendar
INTLDATEFORMATTER.GETCALENDAR(3) 1 INTLDATEFORMATTER.GETCALENDAR(3)
IntlDateFormatter::getCalendar - Get the calendar type used for the IntlDateFormatter
Object oriented style
SYNOPSIS
int IntlDateFormatter::getCalendar (void )
DESCRIPTION
Procedural style
int datefmt_get_calendar (IntlDateFormatter $fmt)
PARAMETERS
o $fmt
- The formatter resource
RETURN VALUES
The calendar type being used by the formatter. Either IntlDateFormatter::TRADITIONAL or IntlDateFormatter::GREGORIAN.
EXAMPLES
Example #1
datefmt_get_calendar(3) example
<?php
$fmt = datefmt_create(
'en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'America/Los_Angeles',
IntlDateFormatter::GREGORIAN
);
echo 'calendar of the formatter is : ' . datefmt_get_calendar($fmt);
datefmt_set_calendar($fmt, IntlDateFormatter::TRADITIONAL);
echo 'Now calendar of the formatter is : ' . datefmt_get_calendar($fmt);
?>
Example #2
OO example
<?php
$fmt = new IntlDateFormatter(
'en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'America/Los_Angeles',
IntlDateFormatter::GREGORIAN
);
echo 'calendar of the formatter is : ' . $fmt->getCalendar();
$fmt->setCalendar(IntlDateFormatter::TRADITIONAL);
echo 'Now calendar of the formatter is : ' . $fmt->getCalendar();
?>
The above example will output:
calendar of the formatter is : 1
Now calendar of the formatter is : 0
SEE ALSO
datefmt_get_calendar_object(3), datefmt_set_calendar(3), datefmt_create(3).
PHP Documentation Group INTLDATEFORMATTER.GETCALENDAR(3)