How to copy a file with systemd mount unit escape in name on cifs mount?












0















I'm writing a backup with rsync and a file with the systemd mount unit escape x2d for - on a cifs (protocol version 3) (/mnt/diskstation/backup in this example) causes the following trouble:



> sudo rsync -a /etc/systemd/system/ /mnt/diskstation/backup/test/
rsync: recv_generator: failed to stat "/mnt/diskstation/backup/test/snap-openmapperx2ddesktop-22.mount": Invalid argument (22)
rsync: symlink "/mnt/diskstation/backup/test/multi-user.target.wants/snap-openmapperx2ddesktop-22.mount" -> "/etc/systemd/system/snap-openmapperx2ddesktop-22.mount" failed: Invalid argument (22)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]


Copying the file to /tmp with sudo rsync -a /etc/systemd/system/ /tmp/test/ works fine.



Some more info about the file:



> stat /etc/systemd/system/snap-openmapper\x2ddesktop-22.mount 
Datei: /etc/systemd/system/snap-openmapperx2ddesktop-22.mount
Größe: 263 Blöcke: 8 EA Block: 4096 Normale Datei
Gerät: 802h/2050d Inode: 2243 Verknüpfungen: 1
Zugriff: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Zugriff : 2019-01-13 10:35:13.500148076 +0100
Modifiziert: 2018-06-30 21:10:57.316164101 +0200
Geändert : 2018-08-02 13:54:58.150254417 +0200
Geburt : -


I'm wondering where the responsibility for this behaviour lies: user (cifs might have trouble allowing in the name, but it's 2018, so...), rsync or cifs.










share|improve this question



























    0















    I'm writing a backup with rsync and a file with the systemd mount unit escape x2d for - on a cifs (protocol version 3) (/mnt/diskstation/backup in this example) causes the following trouble:



    > sudo rsync -a /etc/systemd/system/ /mnt/diskstation/backup/test/
    rsync: recv_generator: failed to stat "/mnt/diskstation/backup/test/snap-openmapperx2ddesktop-22.mount": Invalid argument (22)
    rsync: symlink "/mnt/diskstation/backup/test/multi-user.target.wants/snap-openmapperx2ddesktop-22.mount" -> "/etc/systemd/system/snap-openmapperx2ddesktop-22.mount" failed: Invalid argument (22)
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]


    Copying the file to /tmp with sudo rsync -a /etc/systemd/system/ /tmp/test/ works fine.



    Some more info about the file:



    > stat /etc/systemd/system/snap-openmapper\x2ddesktop-22.mount 
    Datei: /etc/systemd/system/snap-openmapperx2ddesktop-22.mount
    Größe: 263 Blöcke: 8 EA Block: 4096 Normale Datei
    Gerät: 802h/2050d Inode: 2243 Verknüpfungen: 1
    Zugriff: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
    Zugriff : 2019-01-13 10:35:13.500148076 +0100
    Modifiziert: 2018-06-30 21:10:57.316164101 +0200
    Geändert : 2018-08-02 13:54:58.150254417 +0200
    Geburt : -


    I'm wondering where the responsibility for this behaviour lies: user (cifs might have trouble allowing in the name, but it's 2018, so...), rsync or cifs.










    share|improve this question

























      0












      0








      0








      I'm writing a backup with rsync and a file with the systemd mount unit escape x2d for - on a cifs (protocol version 3) (/mnt/diskstation/backup in this example) causes the following trouble:



      > sudo rsync -a /etc/systemd/system/ /mnt/diskstation/backup/test/
      rsync: recv_generator: failed to stat "/mnt/diskstation/backup/test/snap-openmapperx2ddesktop-22.mount": Invalid argument (22)
      rsync: symlink "/mnt/diskstation/backup/test/multi-user.target.wants/snap-openmapperx2ddesktop-22.mount" -> "/etc/systemd/system/snap-openmapperx2ddesktop-22.mount" failed: Invalid argument (22)
      rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]


      Copying the file to /tmp with sudo rsync -a /etc/systemd/system/ /tmp/test/ works fine.



      Some more info about the file:



      > stat /etc/systemd/system/snap-openmapper\x2ddesktop-22.mount 
      Datei: /etc/systemd/system/snap-openmapperx2ddesktop-22.mount
      Größe: 263 Blöcke: 8 EA Block: 4096 Normale Datei
      Gerät: 802h/2050d Inode: 2243 Verknüpfungen: 1
      Zugriff: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
      Zugriff : 2019-01-13 10:35:13.500148076 +0100
      Modifiziert: 2018-06-30 21:10:57.316164101 +0200
      Geändert : 2018-08-02 13:54:58.150254417 +0200
      Geburt : -


      I'm wondering where the responsibility for this behaviour lies: user (cifs might have trouble allowing in the name, but it's 2018, so...), rsync or cifs.










      share|improve this question














      I'm writing a backup with rsync and a file with the systemd mount unit escape x2d for - on a cifs (protocol version 3) (/mnt/diskstation/backup in this example) causes the following trouble:



      > sudo rsync -a /etc/systemd/system/ /mnt/diskstation/backup/test/
      rsync: recv_generator: failed to stat "/mnt/diskstation/backup/test/snap-openmapperx2ddesktop-22.mount": Invalid argument (22)
      rsync: symlink "/mnt/diskstation/backup/test/multi-user.target.wants/snap-openmapperx2ddesktop-22.mount" -> "/etc/systemd/system/snap-openmapperx2ddesktop-22.mount" failed: Invalid argument (22)
      rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]


      Copying the file to /tmp with sudo rsync -a /etc/systemd/system/ /tmp/test/ works fine.



      Some more info about the file:



      > stat /etc/systemd/system/snap-openmapper\x2ddesktop-22.mount 
      Datei: /etc/systemd/system/snap-openmapperx2ddesktop-22.mount
      Größe: 263 Blöcke: 8 EA Block: 4096 Normale Datei
      Gerät: 802h/2050d Inode: 2243 Verknüpfungen: 1
      Zugriff: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
      Zugriff : 2019-01-13 10:35:13.500148076 +0100
      Modifiziert: 2018-06-30 21:10:57.316164101 +0200
      Geändert : 2018-08-02 13:54:58.150254417 +0200
      Geburt : -


      I'm wondering where the responsibility for this behaviour lies: user (cifs might have trouble allowing in the name, but it's 2018, so...), rsync or cifs.







      mount samba rsync cifs filename






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 13 at 17:00









      Karl RichterKarl Richter

      2,41583568




      2,41583568






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109415%2fhow-to-copy-a-file-with-systemd-mount-unit-escape-in-name-on-cifs-mount%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109415%2fhow-to-copy-a-file-with-systemd-mount-unit-escape-in-name-on-cifs-mount%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          數位音樂下載

          When can things happen in Etherscan, such as the picture below?

          格利澤436b