Cannot make a Newscoop backup
  • Whenever I try to make a backup either via the backend or using Terminal I get the following error:
    Unable to copy file/dir /var/lib/newscoop/conf/..//files to /var/lib/newscoop/conf/..//backup/backup-newscoop-2014-02-19-15-37-34.
    When I try this via Terminal I'm in as sudo...

    Any ideas? Presumably its a permissions issue...?
  • 5 Comments sorted by
  • The problem is that the directory /var/lib/newscoop/files does not exist. When files/ was moved to public/files/ they didn't change it in the backup and restore scripts.
  • Ah I see...damn.
    How can a backup be performed then?
    Thanks
  • You have two options:

    Option A.
    Edit the scripts to point to the correct directory.

    In the file bin/newscoop-backup, line 172 must be changed from this:
    camp_copy_files("$html_dir/files", $backupDirFullPath);

    to this:
    camp_copy_files("$html_dir/public/files", $backupDirFullPath);

    and in bin/newscoop-restore, change line 372 from this:
    $fileSrcDir = "$tempDirName/files";

    to this:
    $fileSrcDir = "$tempDirName/public/files";

    and line 375 from this:
    $filesDestDir = $CAMPSITE_DIR.'/files';
    to this:
    $filesDestDir = $CAMPSITE_DIR.'/public/files';

    and line 382, from this:
    $pdfDir = $CAMPSITE_DIR.'/pdf';

    to this:
    $pdfDir = $CAMPSITE_DIR.'/public/pdf';

    add these lines in bin/newscoop-backup:

    if (!$silent) {
        echo " * Backing up videos...";
        flush_output($flush);
    }
    camp_copy_files("$html_dir/public/videos", $backupDirFullPath);
    if (!$silent) {
        echo "done.\n";
    }

    if (!$silent) {
        echo " * Backing up PDFs...";
        flush_output($flush);
    }
    camp_copy_files("$html_dir/public/pdf", $backupDirFullPath);
    if (!$silent) {
        echo "done.\n";
    }

    Option B.
    Copy everything in public/files/ to files/ before every backup, and move them back after every restore.
    You might want to try making a symbolic link from files/ pointing to public/files/.
    If you have no file attachments on any articles, simply create an empty files directory.
    Post edited by Sebastian Olsson (2) at 2014-02-21 08:35:20
  • Excellent.
    Many thanks for your help Sebastian
  • Hello,

    this issue was converted into a ticket as a blocker. It is fixed now in version 4.3 of Newscoop. 


    Thanks Sebastian!