rsync in crontab fails with mkstemp: no such file or directoryrsync: link_stat <PATH> failed: No such file or directory (2)Why is this rsync + ssh cron job giving me 'Permission denied (publickey)' errors?Preserve directory tree while copying with rsyncrsync throwing mkdir: cannot create directory ‘/data/dir_1/dir_2/dir_3/’: No such file or directoryrsync in crontab job fails, but if command is ran manually succeedsrsync creates new directory on local drive instead of syncing to external driversync and crontabrsync error “rsync: failed to set times on ”directory" : No such file or directory (2)Crontab for an rsync backup with ssh connectionTrouble to run commands after changing user password with home directory encryption

Would Slavery Reparations be considered Bills of Attainder and hence Illegal?

Did Shadowfax go to Valinor?

In a spin, are both wings stalled?

Watching something be written to a file live with tail

Combinations of multiple lists

How to take photos in burst mode, without vibration?

Emailing HOD to enhance faculty application

Where does SFDX store details about scratch orgs?

Is the Joker left-handed?

Is it legal for company to use my work email to pretend I still work there?

How much of data wrangling is a data scientist's job?

Is it canonical bit space?

What does it mean to describe someone as a butt steak?

Assassin's bullet with mercury

Is it unprofessional to ask if a job posting on GlassDoor is real?

SSH "lag" in LAN on some machines, mixed distros

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

Why does Kotter return in Welcome Back Kotter?

I would say: "You are another teacher", but she is a woman and I am a man

Will google still index a page if I use a $_SESSION variable?

Should I tell management that I intend to leave due to bad software development practices?

1960's book about a plague that kills all white people

Why does Arabsat 6A need a Falcon Heavy to launch

Is it inappropriate for a student to attend their mentor's dissertation defense?



rsync in crontab fails with mkstemp: no such file or directory


rsync: link_stat <PATH> failed: No such file or directory (2)Why is this rsync + ssh cron job giving me 'Permission denied (publickey)' errors?Preserve directory tree while copying with rsyncrsync throwing mkdir: cannot create directory ‘/data/dir_1/dir_2/dir_3/’: No such file or directoryrsync in crontab job fails, but if command is ran manually succeedsrsync creates new directory on local drive instead of syncing to external driversync and crontabrsync error “rsync: failed to set times on ”directory" : No such file or directory (2)Crontab for an rsync backup with ssh connectionTrouble to run commands after changing user password with home directory encryption






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I am running the following command in my backup script:



rsync -ravv user@serverprod:/home/user/sites/main_site/backup/*.zip /space/backup/main_site/


Crontab:



PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
* 20 * * 1-5 python /root/scripts/backup/backup.py -S -F main_site


I run into a issue every time rsync runs in crontab, but if I try to run it manually, I see no problem at all. I run as root in both cases.



Error:



rsync: mkstemp "/space/backup/main_site/.main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup.zip.I3kVYl" failed: No such file or directory (2)


Now have in mind that main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup is an expected file name. However, what comes before it, . and after .I3kVYl are not. I guess this must be temporary files the command creates in order to perform its operations. And the question is: why this error?



I am using Ubuntu server 14.04.4.










share|improve this question














bumped to the homepage by Community 15 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    Whats the output of ls /space/backup/main_site/?

    – heemayl
    Sep 20 '16 at 7:50











  • The output is the error I pasted: rsync: mkstemp "/space/backup/main_site/.main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup.zip.I3kVYl" failed: No such file or directory (2). It happens to all files I try to sync.

    – Ev.
    Sep 20 '16 at 8:00











  • Just post the exact output of the exact command i have given.

    – heemayl
    Sep 20 '16 at 8:01











  • I misread your comment. The output are files I previously had in the folder: main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip.enc [...].

    – Ev.
    Sep 20 '16 at 8:11











  • Something that is worth mentioning is that I don't see this error when I run directly with the user. It only happens in crontab. I'll change the schedule of this task. It might be conflicting with some others I have.

    – Ev.
    Sep 20 '16 at 8:20

















3















I am running the following command in my backup script:



rsync -ravv user@serverprod:/home/user/sites/main_site/backup/*.zip /space/backup/main_site/


Crontab:



PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
* 20 * * 1-5 python /root/scripts/backup/backup.py -S -F main_site


I run into a issue every time rsync runs in crontab, but if I try to run it manually, I see no problem at all. I run as root in both cases.



Error:



rsync: mkstemp "/space/backup/main_site/.main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup.zip.I3kVYl" failed: No such file or directory (2)


Now have in mind that main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup is an expected file name. However, what comes before it, . and after .I3kVYl are not. I guess this must be temporary files the command creates in order to perform its operations. And the question is: why this error?



I am using Ubuntu server 14.04.4.










share|improve this question














bumped to the homepage by Community 15 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    Whats the output of ls /space/backup/main_site/?

    – heemayl
    Sep 20 '16 at 7:50











  • The output is the error I pasted: rsync: mkstemp "/space/backup/main_site/.main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup.zip.I3kVYl" failed: No such file or directory (2). It happens to all files I try to sync.

    – Ev.
    Sep 20 '16 at 8:00











  • Just post the exact output of the exact command i have given.

    – heemayl
    Sep 20 '16 at 8:01











  • I misread your comment. The output are files I previously had in the folder: main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip.enc [...].

    – Ev.
    Sep 20 '16 at 8:11











  • Something that is worth mentioning is that I don't see this error when I run directly with the user. It only happens in crontab. I'll change the schedule of this task. It might be conflicting with some others I have.

    – Ev.
    Sep 20 '16 at 8:20













3












3








3


1






I am running the following command in my backup script:



rsync -ravv user@serverprod:/home/user/sites/main_site/backup/*.zip /space/backup/main_site/


Crontab:



PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
* 20 * * 1-5 python /root/scripts/backup/backup.py -S -F main_site


I run into a issue every time rsync runs in crontab, but if I try to run it manually, I see no problem at all. I run as root in both cases.



Error:



rsync: mkstemp "/space/backup/main_site/.main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup.zip.I3kVYl" failed: No such file or directory (2)


Now have in mind that main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup is an expected file name. However, what comes before it, . and after .I3kVYl are not. I guess this must be temporary files the command creates in order to perform its operations. And the question is: why this error?



I am using Ubuntu server 14.04.4.










share|improve this question














I am running the following command in my backup script:



rsync -ravv user@serverprod:/home/user/sites/main_site/backup/*.zip /space/backup/main_site/


Crontab:



PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
* 20 * * 1-5 python /root/scripts/backup/backup.py -S -F main_site


I run into a issue every time rsync runs in crontab, but if I try to run it manually, I see no problem at all. I run as root in both cases.



Error:



rsync: mkstemp "/space/backup/main_site/.main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup.zip.I3kVYl" failed: No such file or directory (2)


Now have in mind that main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup is an expected file name. However, what comes before it, . and after .I3kVYl are not. I guess this must be temporary files the command creates in order to perform its operations. And the question is: why this error?



I am using Ubuntu server 14.04.4.







server rsync






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 20 '16 at 7:02









Ev.Ev.

12117




12117





bumped to the homepage by Community 15 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 15 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.









  • 1





    Whats the output of ls /space/backup/main_site/?

    – heemayl
    Sep 20 '16 at 7:50











  • The output is the error I pasted: rsync: mkstemp "/space/backup/main_site/.main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup.zip.I3kVYl" failed: No such file or directory (2). It happens to all files I try to sync.

    – Ev.
    Sep 20 '16 at 8:00











  • Just post the exact output of the exact command i have given.

    – heemayl
    Sep 20 '16 at 8:01











  • I misread your comment. The output are files I previously had in the folder: main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip.enc [...].

    – Ev.
    Sep 20 '16 at 8:11











  • Something that is worth mentioning is that I don't see this error when I run directly with the user. It only happens in crontab. I'll change the schedule of this task. It might be conflicting with some others I have.

    – Ev.
    Sep 20 '16 at 8:20












  • 1





    Whats the output of ls /space/backup/main_site/?

    – heemayl
    Sep 20 '16 at 7:50











  • The output is the error I pasted: rsync: mkstemp "/space/backup/main_site/.main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup.zip.I3kVYl" failed: No such file or directory (2). It happens to all files I try to sync.

    – Ev.
    Sep 20 '16 at 8:00











  • Just post the exact output of the exact command i have given.

    – heemayl
    Sep 20 '16 at 8:01











  • I misread your comment. The output are files I previously had in the folder: main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip.enc [...].

    – Ev.
    Sep 20 '16 at 8:11











  • Something that is worth mentioning is that I don't see this error when I run directly with the user. It only happens in crontab. I'll change the schedule of this task. It might be conflicting with some others I have.

    – Ev.
    Sep 20 '16 at 8:20







1




1





Whats the output of ls /space/backup/main_site/?

– heemayl
Sep 20 '16 at 7:50





Whats the output of ls /space/backup/main_site/?

– heemayl
Sep 20 '16 at 7:50













The output is the error I pasted: rsync: mkstemp "/space/backup/main_site/.main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup.zip.I3kVYl" failed: No such file or directory (2). It happens to all files I try to sync.

– Ev.
Sep 20 '16 at 8:00





The output is the error I pasted: rsync: mkstemp "/space/backup/main_site/.main_site_2016_01_29_132442250748_a82abb7e57f88c2afedb2e00c022f935c470b9e1_backup.zip.I3kVYl" failed: No such file or directory (2). It happens to all files I try to sync.

– Ev.
Sep 20 '16 at 8:00













Just post the exact output of the exact command i have given.

– heemayl
Sep 20 '16 at 8:01





Just post the exact output of the exact command i have given.

– heemayl
Sep 20 '16 at 8:01













I misread your comment. The output are files I previously had in the folder: main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip.enc [...].

– Ev.
Sep 20 '16 at 8:11





I misread your comment. The output are files I previously had in the folder: main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip main_site_2016_01_28_143920817630_1717b605631740cb8740c34ba7c19135c5959a46_backup.zip.enc [...].

– Ev.
Sep 20 '16 at 8:11













Something that is worth mentioning is that I don't see this error when I run directly with the user. It only happens in crontab. I'll change the schedule of this task. It might be conflicting with some others I have.

– Ev.
Sep 20 '16 at 8:20





Something that is worth mentioning is that I don't see this error when I run directly with the user. It only happens in crontab. I'll change the schedule of this task. It might be conflicting with some others I have.

– Ev.
Sep 20 '16 at 8:20










1 Answer
1






active

oldest

votes


















0














I had the similar issue when I tried to sync data with remote FTP server mounted using curlftpfs



Probably your /space/backup folder is also mounted remote folder



The solution worked for me:



  • create temp folder


  • indicate to rsync which temp folder to use (should be outside of remote destination folder)



    rsync -T "my_temp_folder_other_than_space/backup" -ravv user@serverprod:/home/user/sites/main_site/backup/*.zip /space/backup/main_site/






share|improve this answer























    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%2f827287%2frsync-in-crontab-fails-with-mkstemp-no-such-file-or-directory%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I had the similar issue when I tried to sync data with remote FTP server mounted using curlftpfs



    Probably your /space/backup folder is also mounted remote folder



    The solution worked for me:



    • create temp folder


    • indicate to rsync which temp folder to use (should be outside of remote destination folder)



      rsync -T "my_temp_folder_other_than_space/backup" -ravv user@serverprod:/home/user/sites/main_site/backup/*.zip /space/backup/main_site/






    share|improve this answer



























      0














      I had the similar issue when I tried to sync data with remote FTP server mounted using curlftpfs



      Probably your /space/backup folder is also mounted remote folder



      The solution worked for me:



      • create temp folder


      • indicate to rsync which temp folder to use (should be outside of remote destination folder)



        rsync -T "my_temp_folder_other_than_space/backup" -ravv user@serverprod:/home/user/sites/main_site/backup/*.zip /space/backup/main_site/






      share|improve this answer

























        0












        0








        0







        I had the similar issue when I tried to sync data with remote FTP server mounted using curlftpfs



        Probably your /space/backup folder is also mounted remote folder



        The solution worked for me:



        • create temp folder


        • indicate to rsync which temp folder to use (should be outside of remote destination folder)



          rsync -T "my_temp_folder_other_than_space/backup" -ravv user@serverprod:/home/user/sites/main_site/backup/*.zip /space/backup/main_site/






        share|improve this answer













        I had the similar issue when I tried to sync data with remote FTP server mounted using curlftpfs



        Probably your /space/backup folder is also mounted remote folder



        The solution worked for me:



        • create temp folder


        • indicate to rsync which temp folder to use (should be outside of remote destination folder)



          rsync -T "my_temp_folder_other_than_space/backup" -ravv user@serverprod:/home/user/sites/main_site/backup/*.zip /space/backup/main_site/







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 28 '16 at 15:12









        KostanosKostanos

        1,12711419




        1,12711419



























            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%2f827287%2frsync-in-crontab-fails-with-mkstemp-no-such-file-or-directory%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

            Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

            Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

            Torre de la Isleta Índice Véase también Referencias Bibliografía Enlaces externos Menú de navegación38°25′58″N 0°23′02″O / 38.43277778, -0.3838888938°25′58″N 0°23′02″O / 38.43277778, -0.38388889Torre de la Illeta de l’Horta o Torre Saleta. Base de datos de bienes inmuebles. Patrimonio Cultural. Secretaría de Estado de CulturaFicha BIC Torre de la Illeta de l’Horta. Dirección General de Patrimonio Cultural. Generalitat ValencianaLugares de interés. Ayuntamiento del CampelloTorre de la Isleta en CastillosNet.org