Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f2d3101c7 | ||
|
|
bb3c0e5c13 | ||
|
|
e70655189c | ||
|
|
0a01666de3 | ||
|
|
458105e611 |
@@ -6,7 +6,7 @@
|
||||
"read": true,
|
||||
"write": true,
|
||||
"run": ["tar","chmod"],
|
||||
"env": ["CLICOLOR_FORCE"]
|
||||
"env": true
|
||||
}
|
||||
}
|
||||
}
|
||||
-14
@@ -4,7 +4,6 @@ import { program } from "commander"
|
||||
import { parseJSON, parseTOML, stringifyJSON } from "confbox"
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
import util from 'node:util'
|
||||
import strftime from 'strftime'
|
||||
import { spawnSync } from "node:child_process"
|
||||
|
||||
@@ -88,19 +87,6 @@ program.command('delete-snapshot-post <subvolume> <fstype> <number>')
|
||||
console.log('deleted backup at '+destination)
|
||||
})
|
||||
|
||||
program.command('delete-config-post <subvolume> <fstype>')
|
||||
.description('delete metadata of deleted subvolume, retaining backups')
|
||||
.action(function (subvolume, fstype) {
|
||||
delete index[subvolume]
|
||||
if (!config[subvolume]) {
|
||||
console.log(subvolume + ' not configured for snapback')
|
||||
return
|
||||
}
|
||||
const destination = strftime(config[subvolume])
|
||||
const dirname = path.dirname(destination)
|
||||
console.log('existing backups remain at '+dirname)
|
||||
})
|
||||
|
||||
program.parse()
|
||||
|
||||
fs.writeFileSync(program.opts().indexFile,stringifyJSON(index), 'utf8')
|
||||
@@ -1,5 +1,6 @@
|
||||
[Service]
|
||||
Type=exec
|
||||
ExecStartPre=-btrfs subvolume create %I
|
||||
ExecStartPre=-snapper --config %i create-config --template snapback %I
|
||||
ExecStart=snapper --config %i create --cleanup-algorithm number
|
||||
ExecStartPre=-snapper --no-dbus --config %i create-config --template snapback %I
|
||||
ExecStartPre=chown 0 %I/.snapshots
|
||||
ExecStart=snapper --no-dbus --config %i create --cleanup-algorithm number
|
||||
Reference in New Issue
Block a user