doing backups that _do_ _not_ affect access time/date

doing backups that _do_ _not_ affect access time/date

Post by du.. » Tue, 19 Sep 1995 04:00:00



Are there any back-up tools that don't affect the access time of the files
that they're backing up?  It makes it difficult to decide what files are
accessed the least for purposes of cleaning up disk space when all the access
times are set to (approximately) the same time.

Thanks.

--

                                                 2331 Blake St., Apt. 204
                                                 Berkeley, CA 94704

 
 
 

doing backups that _do_ _not_ affect access time/date

Post by Iwan Boska » Thu, 21 Sep 1995 04:00:00



>Are there any back-up tools that don't affect the access time of the files
>that they're backing up?  It makes it difficult to decide what files are
>accessed the least for purposes of cleaning up disk space when all the access
>times are set to (approximately) the same time.

There is. Use tar.

My backup script:

tar -czps --atime-preserve --exclude-from /usr/local/bin/Exclude_file
    -f /backup/usr.local.bin.tgz /usr/local/bin/
tar -czps --atime-preserve --exclude-from /usr/local/bin/Exclude_file
    -f /backup/usr.spool.mail.tgz /usr/spool/mail/
tar -czps --atime-preserve --exclude-from /usr/local/bin/Exclude_file
    -f /backup/home.tgz /home/
tar -czps --atime-preserve --exclude-from /usr/local/bin/Exclude_file
    -f /backup/etc.tgz /etc/
tar -czps --atime-preserve --exclude-from /usr/local/bin/Exclude_file
    -f /backup/backup.tgz /
tar -czps --atime-preserve -f /backup/dos.tgz /dos/

My Exclude-file:

/dos
/backup
/proc
/lost+found

Iwan.
--
Looking for the most interesting part of this message?
Don't worry, I could not find it either.

 
 
 

doing backups that _do_ _not_ affect access time/date

Post by Mark Anthony Dugu » Sat, 23 Sep 1995 04:00:00


: Are there any back-up tools that don't affect the access time of the files
: that they're backing up?  It makes it difficult to decide what files are
: accessed the least for purposes of cleaning up disk space when all the access
: times are set to (approximately) the same time.

: Thanks.

theres a package called "noatime.tgz" that was meant to provide the
option of mounting a ext2 filesystem with the option of not updated
access times of files.  what you could do, is apply the kernel patch, and
just before backing up, remount the filesystems to be backed up, but at
the "noatime" flag to mount.  when you're done backing up, remount the
filesystems without the "noatime" flag.

heres the diff:

--- linux1.2.4/fs/ext2/dir.c    Fri May  5 20:28:35 1995

                offset = 0;
                brelse (bh);
        }
-       if (!IS_RDONLY(inode)) {
+       if (!IS_RDONLY(inode)&&test_opt(sb,ATIME)) {
                inode->i_atime = CURRENT_TIME;
                inode->i_dirt = 1;
        }
diff -u --recursive --new-file linux1.2.4/fs/ext2/file.c linux/fs/ext2/file.c
--- linux1.2.4/fs/ext2/file.c   Fri May  5 20:28:35 1995

        if (!read)
                return -EIO;
        filp->f_reada = 1;
-       if (!IS_RDONLY(inode)) {
+       if (!IS_RDONLY(inode)&&test_opt(sb,ATIME)) {
                inode->i_atime = CURRENT_TIME;
                inode->i_dirt = 1;
        }
diff -u --recursive --new-file linux1.2.4/fs/ext2/super.c
linux/fs/ext2/super.c
--- linux1.2.4/fs/ext2/super.c  Fri May  5 20:28:35 1995

                else if (!strcmp (this_char, "nogrpid") ||
                         !strcmp (this_char, "sysvgroups"))
                        clear_opt (*mount_options, GRPID);
+               else if (!strcmp (this_char, "noatime"))
+                       clear_opt (*mount_options, ATIME);
                else if (!strcmp (this_char, "resgid")) {
                        if (!value || !*value) {
                                printk ("EXT2-fs: the resgid option

 #endif

        set_opt (sb->u.ext2_sb.s_mount_opt, CHECK_NORMAL);
+       set_opt (sb->u.ext2_sb.s_mount_opt, ATIME);
        if (!parse_options ((char *) data, &sb_block, &resuid, &resgid,
            &sb->u.ext2_sb.s_mount_opt)) {
                sb->s_dev = 0;
diff -u --recursive --new-file linux1.2.4/include/linux/ext2_fs.h
linux/include/linux/ext2_fs.h
--- linux1.2.4/include/linux/ext2_fs.h  Fri May  5 20:28:36 1995

 #define EXT2_MOUNT_ERRORS_RO           0x0020  /* Remount fs ro on
errors */
 #define EXT2_MOUNT_ERRORS_PANIC                0x0040  /* Panic on
errors */
 #define EXT2_MOUNT_MINIX_DF            0x0080  /* Mimics the Minix
statfs */
-
+#define EXT2_MOUNT_ATIME               0x0100  /* Do change atime stamp */
 #define clear_opt(o, opt)              o &= ~EXT2_MOUNT_##opt
 #define set_opt(o, opt)                        o |= EXT2_MOUNT_##opt
 #define test_opt(sb, opt)              ((sb)->u.ext2_sb.s_mount_opt & \

--
Mark Duguid      Certified Linux Geek        Saskatoon, Saskatchewan, Canada

Sysop of the Coredump BBS  (306) 652-7037  archive + unix shell + local news
"To turn any 486/586 into a 8088,..just add Dos and let freeze over Windows.
Just netsurfin on an anvil.  My postings contain my opinions, not the SFN's.

 
 
 

1. Backup by file w/o changing access date/time

Does anyone have a good system of backing up all files without modifying the
access date/time of the files?

On other systems I've used find | cpio or find | tar very successfully.  On
this system (AIX 5.1L) I've tried to use find | backup (by name), but it
updates each file's access date/time with the date/time of backup. This
causes various types of ripples in our file system management routines.

I've tried find | tar and find | cpio on this system, but they don't
complete satisfactory.  They seem to get stuck trying to back up strange
file types.

Does anyone have a find | cpio or find | tar method which backs up all
normal files, all symbolic links, and all directories (empty or not),
without getting confused by the other types of file entries on the system?

Thanks.

Bob

2. Help with Grub please.

3. date/time of a file compare with current date/time

4. Apache server under linux

5. run time date and syslog date/time conflict

6. Removing bogus files -- HELP!

7. backup changes access date

8. Q: I can't print even with apsfilter!

9. file modify/access time and date

10. Id Last Access Date/Time

11. file modify/access date and time