Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
backupninja
backupninja
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 86
    • Issues 86
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 6
    • Merge Requests 6
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • riseuplabs
  • backupninjabackupninja
  • Issues
  • #11265

Closed
Open
Opened Oct 15, 2016 by Ondřej Grover@smartass
  • Report abuse
  • New issue
Report abuse New issue

rsync handler: rotate_short_remote should create $folder.0 on first run

The problem

The rotate_short{,_remote} functions only rotate the folders, but on the first run they create no initial $folder.0 directory. For this reason after the local rotate_short function the initial directory is created if it does not exist (which would be the case on first run). However, for the remote target this action is missing.

Suggested solution

The initial directory can be created either in the remote_short_remote function or in a separate SSH command (seems wasteful). For now I simply put in the rotate_short_remote function this snippet

# SNIP
  if [ ! -d $folder.0 ] ; then
    mkdir -p /$folder.0
  fi
  ##### END REMOTE SCRIPT #######
# SNIP

It's up to you whether you want to maintain the rotation functions consistent or not. I would vote for putting the snippet into both rotation functions.

BTW, it would be very helpful to ship a Debian backport package to Jessie with this and other fixes.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
2
Labels
Bug Handler: rsync
Assign labels
  • View project labels
Reference: riseuplabs/backupninja#11265