Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #170176

Re: How to prevent /tmp files from being deleted at reboot

From MI <mi.lists.debian@alma.ch>
Newsgroups linux.debian.user
Subject Re: How to prevent /tmp files from being deleted at reboot
Date 2016-07-16 16:10 +0200
Message-ID <rVys1-4MB-7@gated-at.bofh.it> (permalink)
References <rT2cW-4IP-3@gated-at.bofh.it> <rTGN5-5On-37@gated-at.bofh.it> <rTJrA-7yP-15@gated-at.bofh.it> <rU7WW-6Ps-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Thank you for looking into this.

> Now to your issue. You said you wanted time based clean-up (remove files
> older then 30 days) but *not* remove them on boot.

In fact, cleanup on boot would be fine. However, "cleanup" should only cleanup files 
older than the age argument.

I tried these:

- Empty /etc/tmpfiles.d/tmp.conf :

    As expected, nothing is cleaned up.

- "D /tmp/ 1777 root root 30d"

    Everything is deleted at boot, or when running "systemd-tmpfiles --create
    --remove --clean"
    Also with  "~30d" instead of "30d".

- "d /tmp/ 1777 root root 30d"

    Nothing is deleted at boot or when running "systemd-tmpfiles --create --remove
    --clean" without a reboot.

    # grep ' /tmp' /etc/tmpfiles.d/tmp.conf
    d /tmp 1777 root root 30d
    x /tmp/systemd-private-%b-*
    X /tmp/systemd-private-%b-*/tmp
    # reboot
    ...
    # ls -Al /tmp/
    total 36
    ...
    -rw-rw-r-- 1 root root    8 Jul 16 15:21 KEEPTHIS.txt
    -rw-rw-r-- 1 root root    9 Jan  1  2016 TOOOLD.txt
    ...

So the age argument seems to always be ignored?

And I find no way to get the old (before systemd) behaviour: cleanup /tmp at boot, 
but preserve "recent" files

If this is the expected behaviour, then either the documentation is quite unclear and 
misleading, or I'm too dumb to understand it (which is actually quite possible...)

MI

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-09 17:20 +0200
  Re: How to prevent /tmp files from being deleted at reboot Sven Hartge <sven@svenhartge.de> - 2016-07-09 19:40 +0200
    Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-09 23:20 +0200
      Re: How to prevent /tmp files from being deleted at reboot Linux-Fan <Ma_Sys.ma@web.de> - 2016-07-10 15:40 +0200
        Re: How to prevent /tmp files from being deleted at reboot Wilko Fokken <wfokken@web.de> - 2016-08-07 21:00 +0200
  Re: How to prevent /tmp files from being deleted at reboot Jörg-Volker Peetz <jvpeetz@web.de> - 2016-07-10 17:20 +0200
    Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-10 23:10 +0200
      Re: How to prevent /tmp files from being deleted at reboot "D. R. Evans" <doc.evans@gmail.com> - 2016-07-11 16:00 +0200
        Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-11 17:50 +0200
          Re: How to prevent /tmp files from being deleted at reboot "D. R. Evans" <doc.evans@gmail.com> - 2016-07-11 18:10 +0200
            Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-16 15:00 +0200
              Re: How to prevent /tmp files from being deleted at reboot "D. R. Evans" <doc.evans@gmail.com> - 2016-07-16 15:10 +0200
                Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-16 15:30 +0200
                Re: How to prevent /tmp files from being deleted at reboot "D. R. Evans" <doc.evans@gmail.com> - 2016-07-16 17:10 +0200
                Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-16 17:30 +0200
                How to prevent /tmp files from being deleted at reboot Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> - 2016-08-05 09:30 +0200
                Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-08-05 21:40 +0200
                Re: Re: How to prevent /tmp files from being deleted at reboot Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> - 2016-08-06 16:10 +0200
              Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-16 15:30 +0200
  Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-11 12:40 +0200
    Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-11 15:30 +0200
      Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-12 17:40 +0200
      Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-12 17:40 +0200
        Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-16 16:10 +0200
          Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-16 16:20 +0200
            Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-16 16:30 +0200
              Re: How to prevent /tmp files from being deleted at reboot Mark Fletcher <mark27q1@gmail.com> - 2016-07-16 16:40 +0200
                Re: How to prevent /tmp files from being deleted at reboot Michael Biebl <biebl@debian.org> - 2016-07-16 16:50 +0200
                Re: How to prevent /tmp files from being deleted at reboot MI <mi.lists.debian@alma.ch> - 2016-07-16 17:20 +0200
                How to prevent /tmp files from being deleted at reboot Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> - 2016-08-05 09:30 +0200
        Re: How to prevent /tmp files from being deleted at reboot Josh Triplett <josh@joshtriplett.org> - 2016-07-28 09:10 +0200

csiph-web