[opensuse] what to backup, or where is stored data?
Hello, I'm on the way of building a new server. I have limited room in / and want to be able to backup relevant data easily. So I wonder where data is stored in a server (apache, postfix or exim, mailman, inn, dovecot, squirellmail...). I know most of the config data is in /etc. There is little problem to backup /etc because no file there should be let open (locked). I already moved /srv to /home. In fact, I create a /data folder in /home, with /srv folder in it and mount it bind on /srv with this fstab line: /home/data/srv /srv none bind this works very well. AFAIK, Inn or Mailman data are stored in fake users in /home but what about mariadb (mysql), log files, mail spool files? is it possible/sensible to make for /var what I did for /srv? (there is an annoying /var/lib/ntp/proc/ folder there :-() any other idea? thanks jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
jdd wrote:
Hello,
I'm on the way of building a new server.
I have limited room in / and want to be able to backup relevant data easily.
So I wonder where data is stored in a server (apache, postfix or exim, mailman, inn, dovecot, squirellmail...).
I know most of the config data is in /etc. There is little problem to backup /etc because no file there should be let open (locked).
I already moved /srv to /home.
In fact, I create a /data folder in /home, with /srv folder in it and mount it bind on /srv with this fstab line:
/home/data/srv /srv none bind
this works very well.
AFAIK, Inn or Mailman data are stored in fake users in /home
Not in my installation - inn uses /var/spool/news, mailman uses /var/lib/mailman.
but what about mariadb (mysql), log files, mail spool files?
By default: /var/lib/mysql, /var/log (and many others, application specific), /var/mail, /var/spool/postfix
is it possible/sensible to make for /var what I did for /srv? (there is an annoying /var/lib/ntp/proc/ folder there :-()
proc is also bind mounted, you should have no issue with the same trick.
any other idea?
Just backup your data from the regular locations. -- Per Jessen, Zürich (19.1°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/24/2014 03:46 AM, jdd wrote:
but what about mariadb (mysql), log files, mail spool files?
Once, long ago, I forgot about /var/spool/mail and lost it all in an upgrade that reformatted /var. Never again! Now each user's mail is delivered to ~/Mail/INBOX You too can tweak procmail, Postfix or whatever your mail delivery agent is. Realistically, three is a lot of stuff in /var that you might not want to preserve across a reinstall or upgrade. YMMV. The move to put all the config under /etc was one I appreciated. Heck, some of us here date from the time before there was /home and the /usr tree was heavily over-populated! You might think what other relocations and symlinks/rebinds your could do.
I already moved /srv to /home. In fact, I create a /data folder in /home, with /srv folder in it and mount it bind on /srv
Personally I would just make /srv another partition and not reformat it when reinstalling/upgrading. But then the way I do backups is tied in to the way my disks are partitions (so that find and rsync can use the "-x" option to not cross partition boundaries). -- Aviation is not so much a profession as it is a disease. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
Now each user's mail is delivered to ~/Mail/INBOX
In my dovecot.conf, I've got: mail_location = mbox:~/mail:INBOX=/var/mail/%u:LAYOUT=fs Should I change that to?: mail_location = mbox:~/mail:INBOX=`/mail/%u:LAYOUT=fs I expect I'll have to copy from /var/spool/mail first. I had considered linking /var/spool/mail to ~/Mail. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/24/2014 10:46 AM, James Knott wrote:
Anton Aylward wrote:
Now each user's mail is delivered to ~/Mail/INBOX
In my dovecot.conf, I've got: mail_location = mbox:~/mail:INBOX=/var/mail/%u:LAYOUT=fs
Should I change that to?: mail_location = mbox:~/mail:INBOX=`/mail/%u:LAYOUT=fs
Are you running 1.x or 2.x? I have 2.x and use a number of namespaces including namespace inbox { # separator = / prefix = # location = maildir:~/Mail:INBOX=~/Mail/INBOX:LAYOUT=fs location = maildir:~/Mail/INBOX:LAYOUT=fs inbox = yes hidden = yes list = no } It is possible to mix mbox and maildir using namespaces. The 2.x documentation mentions this but you'll have to experiment. I finally got it working. Incoming and 'active' are maildir; archival is mbox. namespace ARCHIVE { # Namespace type: private, shared or public type = private separator = / prefix = ARCHIVE/ location = mbox:/home/%u/Mail/ARCHIVE. inbox = no hidden = no list = yes # subscriptions = yes } You could use the "%u" for the inbox namespace as well.
I expect I'll have to copy from /var/spool/mail first.
Yes
I had considered linking /var/spool/mail to ~/Mail.
Appropriately for each user. But beware! You may run into mbox/maildir problems! Postfix and fetchmail have to deal in the same format as well. -- If the errors of the past were good enough for our ancestors, they re good enough for us! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
Are you running 1.x or 2.x?
2.1
I had considered linking /var/spool/mail to ~/Mail. Appropriately for each user. But beware! You may run into mbox/maildir problems! Postfix and fetchmail have to deal in the same format as well.
I just have a single user on my IMAP server. Using a symlink shouldn't cause problems in accessing mail. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-04-24 16:46, James Knott wrote:
Anton Aylward wrote:
Now each user's mail is delivered to ~/Mail/INBOX
In my dovecot.conf, I've got: mail_location = mbox:~/mail:INBOX=/var/mail/%u:LAYOUT=fs
The problem is not dovecot: the config simply tells dovecot where to search for the "existing" mail storage. Typically you have to tell postfix where to put emails (deliver is the word they use). If you use procmail, then you have to change it. I have: mail_location = mbox:~/Mail:INBOX=/var/mail/%u
I had considered linking /var/spool/mail to ~/Mail.
No, that might have other consequences, I think. Rather move emails. Default Linux mail clients (like "mail") read from the system spool, so I think better not change it. In my config, postfix uses procmail to deliver. What ends in "/var/spool/mail/username" is just the "system" inbox (those that do not fit any procmail rule), and mail clients like "pine" reads there and move to "/home/username/mbox". Thunderbird, via dovecot, reads from the empty system spool, that's the default "INBOX". Maybe not the best thing to do :-) :-? -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Carlos E. R. wrote:
The problem is not dovecot: the config simply tells dovecot where to search for the "existing" mail storage.
Typically you have to tell postfix where to put emails (deliver is the word they use). If you use procmail, then you have to change it.
I don't use postfix. I use fetchmail to bring in mail from my ISP and then use dovecot so that I have my own IMAP server so that my email is available on all devices. I just have a single user on that server. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-04-24 23:32, James Knott wrote:
Carlos E. R. wrote:
The problem is not dovecot: the config simply tells dovecot where to search for the "existing" mail storage.
Typically you have to tell postfix where to put emails (deliver is the word they use). If you use procmail, then you have to change it.
I don't use postfix. I use fetchmail to bring in mail from my ISP and then use dovecot so that I have my own IMAP server so that my email is available on all devices. I just have a single user on that server.
Ok, then you have to reconfigure fetchmail so that it puts email where you want it. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Carlos E. R. wrote:
On 2014-04-24 16:46, James Knott wrote:
Anton Aylward wrote:
Now each user's mail is delivered to ~/Mail/INBOX
In my dovecot.conf, I've got: mail_location = mbox:~/mail:INBOX=/var/mail/%u:LAYOUT=fs
The problem is not dovecot: the config simply tells dovecot where to search for the "existing" mail storage.
Typically you have to tell postfix where to put emails (deliver is the word they use). If you use procmail, then you have to change it.
There is another option - you can have postfix deliver mails directly to dovecot, e.g. via lmtp. That way dovecot is completely in charge. -- Per Jessen, Zürich (9.1°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-04-28 12:32, Per Jessen wrote:
Carlos E. R. wrote:
Typically you have to tell postfix where to put emails (deliver is the word they use). If you use procmail, then you have to change it.
There is another option - you can have postfix deliver mails directly to dovecot, e.g. via lmtp. That way dovecot is completely in charge.
In my case, I was using postfix and procmail for years before I installed dovecot; and procmail was doing the filtering on dozens of folders. I didn't see an easy way to change that, so procmail is still doing it. Of course, it means that now and then dovecot notices a mbox changed and has to reindex it again. Not optimal. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 2014-04-24 10:18 (GMT-0400) Anton Aylward composed:
The move to put all the config under /etc was one I appreciated.
"Was", as in completed? When? Which distro? Are you referring to something that happened when lsb was an infant? Rawhide has kdmrc logically located in its /etc/ tree, oddly enough in /etc/kde/, but I don't find kdmrc anywhere in any openSUSE /etc/ tree, unless I made a symlink to it from somewhere in /opt/ or the brobdingnagian /usr/. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/24/2014 01:22 PM, Felix Miata wrote:
On 2014-04-24 10:18 (GMT-0400) Anton Aylward composed:
The move to put all the config under /etc was one I appreciated.
"Was", as in completed? When? Which distro? Are you referring to something that happened when lsb was an infant?
"Was" as in that I appreciated the effort and the intent. Like you I have grave reservations about the completion and thoroughness.
Rawhide has kdmrc logically located in its /etc/ tree, oddly enough in /etc/kde/, but I don't find kdmrc anywhere in any openSUSE /etc/ tree, unless I made a symlink to it from somewhere in /opt/ or the brobdingnagian /usr/.
Indeed: /usr/share/kde4/config/kdm/kdmrc That annoyed me as well! We've already split /home out of /usr and sadly we've moved /bin and /lib INTO /usr. -- He who would make his own liberty secure must guard even his enemy from oppression; for if he violates this duty he establishes a precedent that will reach to himself. --Thomas Paine -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-04-24 22:29, Anton Aylward wrote:
"Was" as in that I appreciated the effort and the intent. Like you I have grave reservations about the completion and thoroughness.
Like having init scripts under /etc/init.d... ;-) Or having hylafax config under "/var/spool/fax/etc/"... -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Anton Aylward wrote:
On 04/24/2014 03:46 AM, jdd wrote:
but what about mariadb (mysql), log files, mail spool files?
Once, long ago, I forgot about /var/spool/mail and lost it all in an upgrade that reformatted /var.
Never again! Now each user's mail is delivered to ~/Mail/INBOX
You too can tweak procmail, Postfix or whatever your mail delivery agent is.
Realistically, three is a lot of stuff in /var that you might not want to preserve across a reinstall or upgrade. YMMV.
The move to put all the config under /etc was one I appreciated. Heck, some of us here date from the time before there was /home and the /usr tree was heavily over-populated!
Now, because of the shortsighted developers of udev and systemd, things that belong in /bin or /sbin because they are boot-up essentials have been found /usr/bin and /usr/sbin. What kind of IDIOTS move boot-time executables out of /bin and /sbi into /us
You might think what other relocations and symlinks/rebinds your could do.
I already moved /srv to /home. In fact, I create a /data folder in /home, with /srv folder in it and mount it bind on /srv
Personally I would just make /srv another partition and not reformat it when reinstalling/upgrading. But then the way I do backups is tied in to the way my disks are partitions (so that find and rsync can use the "-x" option to not cross partition boundaries).
There is a reason that I have ALL of the following as seperate partitions: /home /local /var /boot /tmp /srv /opt I would have /usr on a separate partition, too, but udev and systemd have made it impossible for such a configuration to even boot up.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, Apr 24, 2014 at 3:07 PM, Dirk Gently <dirk.gently00@gmail.com> wrote:
There is a reason that I have ALL of the following as seperate partitions:
/home /local /var /boot /tmp /srv /opt
I would have /usr on a separate partition, too, but udev and systemd have made it impossible for such a configuration to even boot up.
openSUSE 13.1 includes the code to mount /usr in the initrd. By design /usr should be mounted prior to systemd being kicked off. I'm not saying I like it, but your assumption that /usr can't be it's own partition is false. I don't "think" /usr can come from a NFS server in 13.1, but I'm not even sure about that. Greg -- Greg Freemyer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/24/2014 03:07 PM, Dirk Gently wrote:
I would have /usr on a separate partition, too, but udev and systemd have made it impossible for such a configuration to even boot up.
Then you must be doing something wrong since I have /usr (and /usr/share and parts of /usr/lib) on a separate partition on one 13.1 machine (not the one I'm using to experiment with the one-file-system-that-is-BtrFS). -- quidquid latine dictum sit, altum viditur. (Whatever is said in Latin sounds profound.) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-04-24 21:07, Dirk Gently wrote:
I would have /usr on a separate partition, too, but udev and systemd have made it impossible for such a configuration to even boot up.
Not true: Telcontar:~ # mount | grep "/usr" | grep -v cgroup /dev/sdd8 on /usr type xfs (rw,relatime,attr2,inode64,noquota) /dev/sde6 on /usr/src type reiserfs (rw,relatime,user_xattr,acl) /dev/sde7 on /usr/local type reiserfs (rw,relatime,user_xattr,acl) /dev/sde14 on /usr/gamedata type reiserfs (rw,relatime,user_xattr,acl) Telcontar:~ # -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
participants (8)
-
Anton Aylward
-
Carlos E. R.
-
Dirk Gently
-
Felix Miata
-
Greg Freemyer
-
James Knott
-
jdd
-
Per Jessen