Re: Backup Directory
Riza Dindir <[email protected]> Sun, 8 Mar 2026 17:59:46 +0300
| Newsgroups | gmane.editors.vim |
|---|---|
| Message-ID | <CA+ek4BGz7Hm_7nnpj_Mye=-PC=gy5NL-ajhV1qMGt1pOV7Zh8w@mail.gmail.com> |
--000000000000b7a4da064c847ce6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable As far as I know, whenever you write something to the file that you are editing, and the backup is enabled (writebackup, and backup I believe are the settings, you will have to check with the documentation) and the backupdir is set, it will write to that directory. And the /etc folder is a system directory, and you might want to keep these folders clean/clear of backups. You could create a ~/.backup folder in your home directory, or maybe you can use /tmp/.backup, or you could use /var/run/.backup (as per the Filesystem Hierarchy Standard). /etc is used for host system specific configuration (if you care about the FHS). But again there is nothing that says you can not change the permissions of the /etc directory and use that for your own purposes. Regards On Sun, Mar 8, 2026 at 3:58=E2=80=AFPM Christopher <crestchristopher@gmail.= com> wrote: > It's possible I should be asking, how does it backup.In other words, must > I start vim and write something and it will backup to the folder in this > case ".backup" ? Or regardless what file it open, it will backup to this > folder. Otherwise so it's clear if it's a permissions issue. Currently th= e > /etc/.backup directories both can read and write for the user. > > On Saturday, March 7, 2026 at 10:28:21=E2=80=AFPM UTC-5 Riza Dindir wrote= : > >> Hello Christopher, >> >> As Eric Marceau pointed out, the double forward slash (//) in the path ( >> "backupdir"=3D//etc/.backup) might be a problem. >> >> Also the double quotes in "backupdir"=3D//etc/.backup might be a problem= . I >> would use "set backupdir=3D/etc/.backup" (without the double quotes) in = the >> ~/.vimrc file or wherever your rc file is. I have something similar in m= y >> settings file: "set bakupdir=3D/tmp" (without the double quotes). >> >> The other thing might be that you have to create the /etc/.backup >> directory, and you might need write permissions to that directory. It is >> odd to use the /etc directory for this IMHO. It might be a good idea to >> move this to the home folder of your choosing (as Badli al Rashid has >> suggested). This can be something like ~/tmp/.backup or something else..= . >> >> Regards >> >> On Sun, Mar 8, 2026 at 5:00=E2=80=AFAM Christopher <[email protected]= m> wrote: >> >>> Why don't I see any backup files, no matter what file I work with ? >>> >>> On Saturday, March 7, 2026 at 12:49:30=E2=80=AFPM UTC-5 badli al rashid= wrote: >>> >>>> hi crestchristopher, >>>> >>>> try with your home folder. >>>> >>>> Sent from Gmail >>>> >>>> On Sat, Mar 7, 2026, 20:45 Christopher <[email protected]> wrote: >>>> >>>>> I'm trying to setup a backup directory; "backupdir"=3D//etc/.backup >>>>> within my vimrc although; no file is being written to this directory = ? >>>>> >>>>> -- >>>>> -- >>>>> You received this message from the "vim_use" maillist. >>>>> Do not top-post! Type your reply below the text you are replying to. >>>>> For more information, visit http://www.vim.org/maillist.php >>>>> >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "vim_use" group. >>>>> To unsubscribe from this group and stop receiving emails from it, sen= d >>>>> an email to [email protected]. >>>>> To view this discussion visit >>>>> https://groups.google.com/d/msgid/vim_use/2d4c7c1e-9437-4c49-aca8-bf1= f2dadb3c1n%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/vim_use/2d4c7c1e-9437-4c49-aca8-bf= 1f2dadb3c1n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter> >>>>> . >>>>> >>>> -- >>> -- >>> You received this message from the "vim_use" maillist. >>> Do not top-post! Type your reply below the text you are replying to. >>> For more information, visit http://www.vim.org/maillist.php >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "vim_use" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >> To view this discussion visit >>> https://groups.google.com/d/msgid/vim_use/c55613d7-5478-4cc6-8702-8fb47= b0b70c2n%40googlegroups.com >>> <https://groups.google.com/d/msgid/vim_use/c55613d7-5478-4cc6-8702-8fb4= 7b0b70c2n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter> >>> . >>> >> -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/vim_use/088c8263-467c-45b2-974d-dc424c9= 64a5fn%40googlegroups.com > <https://groups.google.com/d/msgid/vim_use/088c8263-467c-45b2-974d-dc424c= 964a5fn%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter> > . > --=20 --=20 You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php ---=20 You received this message because you are subscribed to the Google Groups "= vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/vim_use/CA%= 2Bek4BGz7Hm_7nnpj_Mye%3D-PC%3Dgy5NL-ajhV1qMGt1pOV7Zh8w%40mail.gmail.com. --000000000000b7a4da064c847ce6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr">As far=C2=A0as I know, w= henever you write=20 something to the file that you are editing, and the backup is enabled=20 (writebackup, and backup I believe are the settings, you will have to=20 check with the documentation) and the backupdir is set, it will write to that directory.</div><div dir=3D"ltr"><br></div><div>And the /etc folder i= s a system directory, and you might want to keep these folders clean/clear = of backups. You could create a ~/.backup folder in your home directory, or = maybe you can use /tmp/.backup, or you could use /var/run/.backup (as per t= he Filesystem Hierarchy Standard). /etc is used for host system specific co= nfiguration (if you care about the FHS). But again there is nothing that sa= ys you can not change the permissions of the /etc directory and use that fo= r your own purposes.</div><div><br></div><div>Regards</div><br></div><br><d= iv class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gm= ail_attr">On Sun, Mar 8, 2026 at 3:58=E2=80=AFPM Christopher <<a href=3D= "mailto:[email protected]">[email protected]</a>> wrot= e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0= .8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It's poss= ible I should be asking, how does it backup.In other words, must I start vi= m and write something and it will backup to the folder in this case ".= backup" ? Or regardless what file it open, it will backup to this fold= er. Otherwise so it's clear if it's a permissions issue. Currently = the /etc/.backup directories both can read and write for the user.=C2=A0<br= ><br><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">On S= aturday, March 7, 2026 at 10:28:21=E2=80=AFPM UTC-5 Riza Dindir wrote:<br><= /div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bo= rder-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><di= v>Hello Christopher,</div><div><br></div><div>As Eric Marceau pointed out, = the double=C2=A0forward slash (//) in the path (<span>"backupdir"= =3D//etc/.backup)</span>=C2=A0might be a problem.</div><div><br></div><div>= Also the double quotes in "backupdir"=3D//etc/.backup might be a = problem. I would use "set backupdir=3D/etc/.backup" (without the = double quotes) in the ~/.vimrc file or wherever=C2=A0your rc file is. I hav= e something similar in my settings file: "set bakupdir=3D/tmp" (w= ithout the double quotes).</div><div><br></div><div>The other thing might b= e that you have to create the /etc/.backup directory, and you might need wr= ite permissions to that directory. It is odd to use the=C2=A0/etc directory= for this=C2=A0IMHO. It might be a good idea to move this to the home folde= r of your choosing (as Badli al Rashid has suggested). This can be somethin= g like ~/tmp/.backup or something else...</div><div><br></div><div>Regards<= /div></div><br><div class=3D"gmail_quote"></div><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Sun, Mar 8, 2026 at 5:00=E2=80=AFA= M Christopher <<a rel=3D"nofollow">[email protected]</a>> wrote:<= br></div></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote"= style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p= adding-left:1ex">Why don't I see any backup files, no matter what file = I work with ?<br><br><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"= gmail_attr">On Saturday, March 7, 2026 at 12:49:30=E2=80=AFPM UTC-5 badli a= l rashid wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:= 0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">= <div dir=3D"auto"><div><div>hi crestchristopher,</div><div dir=3D"auto"><br= ></div><div dir=3D"auto">try with your home folder.=C2=A0</div><div><br></d= iv><div>Sent from Gmail</div><br><div class=3D"gmail_quote"></div></div></d= iv><div dir=3D"auto"><div><div class=3D"gmail_quote"><div dir=3D"ltr" class= =3D"gmail_attr">On Sat, Mar 7, 2026, 20:45 Christopher <<a rel=3D"nofoll= ow">[email protected]</a>> wrote:<br></div></div></div></div><div di= r=3D"auto"><div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote= " style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);= padding-left:1ex"><div>I'm trying to setup a backup directory; "ba= ckupdir"=3D//etc/.backup within my vimrc although; no file is being wr= itten to this directory ?</div><div><br></div> <p></p></blockquote></div></div></div><div dir=3D"auto"><div><div class=3D"= gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> -- <br> -- <br> You received this message from the "vim_use" maillist.<br> Do not top-post! Type your reply below the text you are replying to.<br> For more information, visit <a href=3D"http://www.vim.org/maillist.php" rel= =3D"noreferrer nofollow" target=3D"_blank">http://www.vim.org/maillist.php<= /a><br> <br> --- <br> You received this message because you are subscribed to the Google Groups &= quot;vim_use" group.<br> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a rel=3D"noreferrer nofollow">[email protected]</a>.<b= r> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= vim_use/2d4c7c1e-9437-4c49-aca8-bf1f2dadb3c1n%40googlegroups.com?utm_medium= =3Demail&utm_source=3Dfooter" rel=3D"noreferrer nofollow" target=3D"_bl= ank">https://groups.google.com/d/msgid/vim_use/2d4c7c1e-9437-4c49-aca8-bf1f= 2dadb3c1n%40googlegroups.com</a>.<br> </blockquote></div></div></div> </blockquote></div> <p></p> -- <br> -- <br> You received this message from the "vim_use" maillist.<br> Do not top-post! Type your reply below the text you are replying to.<br> For more information, visit <a href=3D"http://www.vim.org/maillist.php" rel= =3D"nofollow" target=3D"_blank">http://www.vim.org/maillist.php</a><br> <br> --- <br> You received this message because you are subscribed to the Google Groups &= quot;vim_use" group.<br> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a rel=3D"nofollow">[email protected]</a>.<br></blockqu= ote></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" styl= e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin= g-left:1ex"> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= vim_use/c55613d7-5478-4cc6-8702-8fb47b0b70c2n%40googlegroups.com?utm_medium= =3Demail&utm_source=3Dfooter" rel=3D"nofollow" target=3D"_blank">https:= //groups.google.com/d/msgid/vim_use/c55613d7-5478-4cc6-8702-8fb47b0b70c2n%4= 0googlegroups.com</a>.<br> </blockquote></div> </blockquote></div> <p></p> -- <br> -- <br> You received this message from the "vim_use" maillist.<br> Do not top-post! Type your reply below the text you are replying to.<br> For more information, visit <a href=3D"http://www.vim.org/maillist.php" tar= get=3D"_blank">http://www.vim.org/maillist.php</a><br> <br> --- <br> You received this message because you are subscribed to the Google Groups &= quot;vim_use" group.<br> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]" target=3D"_= blank">[email protected]</a>.<br> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= vim_use/088c8263-467c-45b2-974d-dc424c964a5fn%40googlegroups.com?utm_medium= =3Demail&utm_source=3Dfooter" target=3D"_blank">https://groups.google.c= om/d/msgid/vim_use/088c8263-467c-45b2-974d-dc424c964a5fn%40googlegroups.com= </a>.<br> </blockquote></div></div> <p></p> -- <br /> -- <br /> You received this message from the "vim_use" maillist.<br /> Do not top-post! Type your reply below the text you are replying to.<br /> For more information, visit <a href=3D"http://www.vim.org/maillist.php">htt= p://www.vim.org/maillist.php</a><br /> <br /> --- <br /> You received this message because you are subscribed to the Google Groups &= quot;vim_use" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">vim_use+uns= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= vim_use/CA%2Bek4BGz7Hm_7nnpj_Mye%3D-PC%3Dgy5NL-ajhV1qMGt1pOV7Zh8w%40mail.gm= ail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d= /msgid/vim_use/CA%2Bek4BGz7Hm_7nnpj_Mye%3D-PC%3Dgy5NL-ajhV1qMGt1pOV7Zh8w%40= mail.gmail.com</a>.<br /> --000000000000b7a4da064c847ce6--