rsync in crontab fails with mkstemp: no such file or directoryrsync: link_stat <PATH> failed: No such...

What about the virus in 12 Monkeys?

What killed these X2 caps?

Arrow those variables!

Is it possible to run Internet Explorer on OS X El Capitan?

Why is consensus so controversial in Britain?

Can a rocket refuel on Mars from water?

Why is Collection not simply treated as Collection<?>

How can I fix/modify my tub/shower combo so the water comes out of the showerhead?

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

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

What is the most common color to indicate the input-field is disabled?

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

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

90's TV series where a boy goes to another dimension through portal near power lines

AES: Why is it a good practice to use only the first 16bytes of a hash for encryption?

How do I write bicross product symbols in latex?

Watching something be written to a file live with tail

Took a trip to a parallel universe, need help deciphering

How can saying a song's name be a copyright violation?

Were any external disk drives stacked vertically?

What is the intuition behind short exact sequences of groups; in particular, what is the intuition behind group extensions?

Why do I get two different answers for this counting problem?

What's the difference between 'rename' and 'mv'?

Is it canonical bit space?



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 18 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 18 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 18 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 18 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

            Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

            Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

            Should I use Docker or LXD?How to cache (more) data on SSD/RAM to avoid spin up?Unable to get Windows File...